Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install from github #2

Open
MarcCoru opened this issue Oct 12, 2021 · 2 comments
Open

pip install from github #2

MarcCoru opened this issue Oct 12, 2021 · 2 comments

Comments

@MarcCoru
Copy link

MarcCoru commented Oct 12, 2021

Hi @chrisyeh96 and team,

Thanks for your work and this comprehensive Github repository. And congratulations on the NeurIPS data track acceptance.

I wanted to install the repository directly in pip via pip install git+https://github.com/sustainlab-group/sustainbench.git but ran into the following issue (posted below). This is a convenience issue, but being able to import directly from pip may be a nice addition.

Thanks again,
Marc

❯ python -m pip install git+https://github.com/sustainlab-group/sustainbench.git
Collecting git+https://github.com/sustainlab-group/sustainbench.git
  Cloning https://github.com/sustainlab-group/sustainbench.git to /tmp/pip-req-build-mzsr5qc0
  Running command git clone -q https://github.com/sustainlab-group/sustainbench.git /tmp/pip-req-build-mzsr5qc0
    ERROR: Command errored out with exit status 1:
     command: /home/marc/anaconda3/envs/elects/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-mzsr5qc0/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-mzsr5qc0/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-qaax5_2s
         cwd: /tmp/pip-req-build-mzsr5qc0/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-mzsr5qc0/setup.py", line 7, in <module>
        from version import __version__
    ModuleNotFoundError: No module named 'version'
    ----------------------------------------
WARNING: Discarding git+https://github.com/sustainlab-group/sustainbench.git. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Edit: I got the same error after cloning and pip install .. I changed out the following in setup.py fix

sys.path.insert(0, os.path.join(here, 'sustainbench')) # used to be SustainBench
@chrisyeh96
Copy link
Contributor

Hi @MarcCoru, thanks for your interest in SustainBench! The code is admittedly still in draft shape, so there are some known issues with loading the data. We're working hard to make updates to the code and expect that by the NeurIPS camera-ready deadline, the issues should be ironed out.

@dpaiton
Copy link

dpaiton commented Nov 16, 2021

Thanks for posting your fix @MarcCoru. With that I was able to pip install, but I still had to manually add the location of sustainbench/ to my path.

Note that the package is labeled SustainBench. So this means that, for example, the import line in the dataset download script needs to be changed from sustainbench to SustainBench. Or the name in setup.py needs to be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants