Closed RylanSchaeffer closed 3 years ago
This is Python 3.6.9 and pip 20.2.3
I tried removing the offending library pygobject
and rerunning, but I ran into another error:
Collecting dm-haiku@ git+git://github.com/deepmind/dm-haiku.git@db991d56563221d5a06be5e7228155e53d01aba9
Cloning git://github.com/deepmind/dm-haiku.git (to revision db991d56563221d5a06be5e7228155e53d01aba9) to /tmp/pip-install-h7datbt0/dm-haiku
ERROR: Command errored out with exit status 1:
command: /home/rylan/Documents/dqn_zoo/dqn_zoo_venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h7datbt0/dm-haiku/setup.py'"'"'; __file__='"'"'/tmp/pip-install-h7datbt0/dm-haiku/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-uqzltyvu
cwd: /tmp/pip-install-h7datbt0/dm-haiku/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-h7datbt0/dm-haiku/setup.py", line 18, in <module>
from setuptools import find_namespace_packages
ImportError: cannot import name 'find_namespace_packages'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
A related error for dm-sonnet
seemed to be caused by the user using Python 2 but I am certainly using Python3:
(dqn_zoo_venv) rylan@rylan-ThinkPad-E590:~/Documents/dqn_zoo$ pip --version
pip 20.2.3 from /home/rylan/Documents/dqn_zoo/dqn_zoo_venv/lib/python3.6/site-packages/pip (python 3.6)
Another post suggested uninstalling and then reinstalling setuptools
, which worked for me.
But now a new error appears with python-snappy
:
~/Documents/dqn_zoo$ pip install -r requirements.txt
Collecting asn1crypto==0.24.0
Using cached asn1crypto-0.24.0-py2.py3-none-any.whl (101 kB)
Collecting cloudpickle==1.2.2
Using cached cloudpickle-1.2.2-py2.py3-none-any.whl (25 kB)
Collecting cryptography==2.1.4
Using cached cryptography-2.1.4-cp36-cp36m-manylinux1_x86_64.whl (2.2 MB)
Collecting future==0.18.2
Using cached future-0.18.2.tar.gz (829 kB)
Collecting idna==2.6
Using cached idna-2.6-py2.py3-none-any.whl (56 kB)
Collecting keyring==10.6.0
Using cached keyring-10.6.0-py2.py3-none-any.whl (38 kB)
Collecting keyrings.alt==3.0
Using cached keyrings.alt-3.0-py2.py3-none-any.whl (21 kB)
Collecting opencv-python==4.2.0.34
Using cached opencv_python-4.2.0.34-cp36-cp36m-manylinux1_x86_64.whl (28.2 MB)
Collecting opt-einsum==3.2.1
Using cached opt_einsum-3.2.1-py3-none-any.whl (63 kB)
Collecting pycrypto==2.6.1
Using cached pycrypto-2.6.1.tar.gz (446 kB)
Collecting pyglet==1.3.2
Using cached pyglet-1.3.2-py2.py3-none-any.whl (1.0 MB)
Collecting pyxdg==0.25
Using cached pyxdg-0.25.tar.gz (48 kB)
Collecting SecretStorage==2.3.1
Using cached SecretStorage-2.3.1.tar.gz (16 kB)
Collecting six==1.15.0
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting absl-py==0.9.0
Using cached absl-py-0.9.0.tar.gz (104 kB)
Collecting numpy==1.18.0
Using cached numpy-1.18.0-cp36-cp36m-manylinux1_x86_64.whl (20.1 MB)
Collecting Pillow==7.1.2
Using cached Pillow-7.1.2-cp36-cp36m-manylinux1_x86_64.whl (2.1 MB)
Collecting python-snappy==0.5.4
Using cached python-snappy-0.5.4.tar.gz (21 kB)
Collecting scipy==1.2.1
Using cached scipy-1.2.1-cp36-cp36m-manylinux1_x86_64.whl (24.8 MB)
Processing /home/rylan/.cache/pip/wheels/af/49/6c/0e95549f4da2ae98ecdb63d3873a11b6b757151e0ae0ae1b9f/jax-0.1.72-py3-none-any.whl
Collecting jaxlib@ https://storage.googleapis.com/jax-releases/cuda101/jaxlib-0.1.49-cp36-none-linux_x86_64.whl
Using cached https://storage.googleapis.com/jax-releases/cuda101/jaxlib-0.1.49-cp36-none-linux_x86_64.whl (62.0 MB)
Collecting atari-py==0.2.6
Using cached atari_py-0.2.6-cp36-cp36m-manylinux1_x86_64.whl (2.8 MB)
Collecting gym==0.13.1
Using cached gym-0.13.1.tar.gz (1.6 MB)
Collecting dm-env==1.2
Using cached dm_env-1.2-py3-none-any.whl (22 kB)
Collecting dm-haiku@ git+git://github.com/deepmind/dm-haiku.git@db991d56563221d5a06be5e7228155e53d01aba9
Cloning git://github.com/deepmind/dm-haiku.git (to revision db991d56563221d5a06be5e7228155e53d01aba9) to /tmp/pip-install-3c8l7h9u/dm-haiku
Collecting dm-tree==0.1.5
Using cached dm_tree-0.1.5-cp36-cp36m-manylinux1_x86_64.whl (294 kB)
Collecting optax==0.0.1
Downloading optax-0.0.1-py3-none-any.whl (49 kB)
|████████████████████████████████| 49 kB 1.8 MB/s
Collecting rlax@ git+git://github.com/deepmind/rlax.git@870cba1ea8ad36725f4f3a790846298657b6fd4b
Cloning git://github.com/deepmind/rlax.git (to revision 870cba1ea8ad36725f4f3a790846298657b6fd4b) to /tmp/pip-install-3c8l7h9u/rlax
Collecting cffi>=1.7; platform_python_implementation != "PyPy"
Downloading cffi-1.14.3-cp36-cp36m-manylinux1_x86_64.whl (400 kB)
|████████████████████████████████| 400 kB 6.9 MB/s
Collecting chex>=0.0.2
Downloading chex-0.0.2-py3-none-any.whl (37 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Collecting dataclasses==0.7; python_version < "3.7"
Using cached dataclasses-0.7-py3-none-any.whl (18 kB)
Collecting toolz>=0.9.0
Downloading toolz-0.11.1-py3-none-any.whl (55 kB)
|████████████████████████████████| 55 kB 4.6 MB/s
Using legacy 'setup.py install' for future, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pycrypto, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pyxdg, since package 'wheel' is not installed.
Using legacy 'setup.py install' for SecretStorage, since package 'wheel' is not installed.
Using legacy 'setup.py install' for absl-py, since package 'wheel' is not installed.
Using legacy 'setup.py install' for python-snappy, since package 'wheel' is not installed.
Using legacy 'setup.py install' for gym, since package 'wheel' is not installed.
Using legacy 'setup.py install' for dm-haiku, since package 'wheel' is not installed.
Using legacy 'setup.py install' for rlax, since package 'wheel' is not installed.
Installing collected packages: asn1crypto, cloudpickle, six, idna, pycparser, cffi, cryptography, future, SecretStorage, keyring, keyrings.alt, numpy, opencv-python, opt-einsum, pycrypto, pyglet, pyxdg, absl-py, Pillow, python-snappy, scipy, jax, jaxlib, atari-py, gym, dm-tree, dm-env, dm-haiku, dataclasses, toolz, chex, optax, rlax
Running setup.py install for future ... done
Running setup.py install for SecretStorage ... done
Running setup.py install for pycrypto ... done
Running setup.py install for pyxdg ... done
Running setup.py install for absl-py ... done
Running setup.py install for python-snappy ... error
ERROR: Command errored out with exit status 1:
command: /home/rylan/Documents/dqn_zoo/dqn_zoo_venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3c8l7h9u/python-snappy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3c8l7h9u/python-snappy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5vwf1ixf/install-record.txt --single-version-externally-managed --compile --install-headers /home/rylan/Documents/dqn_zoo/dqn_zoo_venv/include/site/python3.6/python-snappy
cwd: /tmp/pip-install-3c8l7h9u/python-snappy/
Complete output (23 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/snappy
copying snappy/__main__.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/snappy_cffi.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/snappy.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/hadoop_snappy.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/__init__.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/snappy_cffi_builder.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/snappy_formats.py -> build/lib.linux-x86_64-3.6/snappy
running build_ext
building 'snappy._snappy' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/snappy
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/rylan/Documents/dqn_zoo/dqn_zoo_venv/include -I/usr/include/python3.6m -c snappy/snappymodule.cc -o build/temp.linux-x86_64-3.6/snappy/snappymodule.o
snappy/snappymodule.cc:31:10: fatal error: snappy-c.h: No such file or directory
#include <snappy-c.h>
^~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/rylan/Documents/dqn_zoo/dqn_zoo_venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3c8l7h9u/python-snappy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3c8l7h9u/python-snappy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5vwf1ixf/install-record.txt --single-version-externally-managed --compile --install-headers /home/rylan/Documents/dqn_zoo/dqn_zoo_venv/include/site/python3.6/python-snappy Check the logs for full command output.
If you have an error with python-snappy
, you may need to install Snappy C separately
Ok everything succeeded so long as pygobject==3.26.1
is omitted.
I've clarified the purpose of requirements.txt
in f6ea040cb5e55bf65da6cfa07d4daf8225245fa9. These kind of dependency issues are very common since everyone has a different set up and is precisely why a Dockerfile was provided. requirements.txt
is specifically only for use with Dockerfile
, and is not generally applicable.
python3 -m pip install-r requirements.txt
I created a new virtual environment and immediately tried to install the requirements, but ran into a version error: