sustainbench
sustainbench copied to clipboard
pip install from github
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
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.
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.