nrontsis / PILCO

Bayesian Reinforcement Learning in Tensorflow
MIT License
311 stars 84 forks source link

installation: issue with gast, tensorflow #52

Closed emsal0 closed 3 years ago

emsal0 commented 3 years ago

Starting up in a new virtualenv with Python 3.7.5 (arch linux)

(had to run sudo otherwise setup.py gives a permission denied)

Get this as the final error: error: gast 0.2.2 is installed but gast>=0.3.2 is required by {'tensorflow-probability'}

It seems there might be a dependency here that's underspecified (maybe tensorflow version is too high)

Full log:

[env]em@toaster:~/school/cpsc515/proj|master⚡
⇒  sudo python3.7 PILCO/setup.py install
running install
running bdist_egg
running egg_info
writing pilco.egg-info/PKG-INFO
writing dependency_links to pilco.egg-info/dependency_links.txt
writing requirements to pilco.egg-info/requires.txt
writing top-level names to pilco.egg-info/top_level.txt
reading manifest file 'pilco.egg-info/SOURCES.txt'
writing manifest file 'pilco.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying pilco.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pilco.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pilco.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pilco.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pilco.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/pilco-0.1-py3.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing pilco-0.1-py3.7.egg
Removing /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages/pilco-0.1-py3.7.egg
Copying pilco-0.1-py3.7.egg to /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages
pilco 0.1 is already the active version in easy-install.pth

Installed /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages/pilco-0.1-py3.7.egg
Processing dependencies for pilco==0.1
Searching for tensorflow
Reading https://pypi.org/simple/tensorflow/
Downloading https://files.pythonhosted.org/packages/57/bb/e690554331d46e35e47032ff0f7a231061cd71e82e3616dbd42ba1be9474/tensorflow-2.4.0rc0-cp37-cp37m-manylinux2010_x86_64.whl#sha256=8785ee37a48014273ddcb32034569059c83c144b15e6c34e485ef5b001ef373e
Best match: tensorflow 2.4.0rc0
Processing tensorflow-2.4.0rc0-cp37-cp37m-manylinux2010_x86_64.whl
Installing tensorflow-2.4.0rc0-cp37-cp37m-manylinux2010_x86_64.whl to /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages
Adding tensorflow 2.4.0rc0 to easy-install.pth file
Installing estimator_ckpt_converter script to /home/em/school/cpsc515/proj/env/bin
Installing import_pb_to_tensorboard script to /home/em/school/cpsc515/proj/env/bin
Installing saved_model_cli script to /home/em/school/cpsc515/proj/env/bin
Installing tensorboard script to /home/em/school/cpsc515/proj/env/bin
Installing tf_upgrade_v2 script to /home/em/school/cpsc515/proj/env/bin
Installing tflite_convert script to /home/em/school/cpsc515/proj/env/bin
Installing toco script to /home/em/school/cpsc515/proj/env/bin
Installing toco_from_protos script to /home/em/school/cpsc515/proj/env/bin

Installed /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages/tensorflow-2.4.0rc0-py3.7-linux-x86_64.egg
Searching for tabulate
Reading https://pypi.org/simple/tabulate/
Downloading https://files.pythonhosted.org/packages/c4/f4/770ae9385990f5a19a91431163d262182d3203662ea2b5739d0fcfc080f1/tabulate-0.8.7-py3-none-any.whl#sha256=ac64cb76d53b1231d364babcd72abbb16855adac7de6665122f97b593f1eb2ba
Best match: tabulate 0.8.7
Processing tabulate-0.8.7-py3-none-any.whl
Installing tabulate-0.8.7-py3-none-any.whl to /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages
Adding tabulate 0.8.7 to easy-install.pth file
Installing tabulate script to /home/em/school/cpsc515/proj/env/bin

Installed /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages/tabulate-0.8.7-py3.7.egg
Searching for scipy>=0.18.0
Reading https://pypi.org/simple/scipy/
Downloading https://files.pythonhosted.org/packages/fa/cf/94686c3e2b21cba82904a2bbb014f7529d483021802a0116c3a256b00563/scipy-1.5.3-cp37-cp37m-manylinux1_x86_64.whl#sha256=aebb69bcdec209d874fc4b0c7ac36f509d50418a431c1422465fa34c2c0143ea
Best match: scipy 1.5.3
Processing scipy-1.5.3-cp37-cp37m-manylinux1_x86_64.whl
Installing scipy-1.5.3-cp37-cp37m-manylinux1_x86_64.whl to /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages
Adding scipy 1.5.3 to easy-install.pth file

Installed /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages/scipy-1.5.3-py3.7-linux-x86_64.egg
Searching for multipledispatch>=0.6
Reading https://pypi.org/simple/multipledispatch/
Downloading https://files.pythonhosted.org/packages/89/79/429ecef45fd5e4504f7474d4c3c3c4668c267be3370e4c2fd33e61506833/multipledispatch-0.6.0-py3-none-any.whl#sha256=a55c512128fb3f7c2efd2533f2550accb93c35f1045242ef74645fc92a2c3cba
Best match: multipledispatch 0.6.0
Processing multipledispatch-0.6.0-py3-none-any.whl
Installing multipledispatch-0.6.0-py3-none-any.whl to /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages
Adding multipledispatch 0.6.0 to easy-install.pth file

Installed /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages/multipledispatch-0.6.0-py3.7.egg
Searching for gast<0.3,>=0.2.2
Reading https://pypi.org/simple/gast/
Downloading https://files.pythonhosted.org/packages/4e/35/11749bf99b2d4e3cceb4d55ca22590b0d7c2c62b9de38ac4a4a7f4687421/gast-0.2.2.tar.gz#sha256=fe939df4583692f0512161ec1c880e0a10e71e6a232da045ab8edd3756fbadf0
Best match: gast 0.2.2
Processing gast-0.2.2.tar.gz
Writing /tmp/easy_install-nvkje8bv/gast-0.2.2/setup.cfg
Running gast-0.2.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-nvkje8bv/gast-0.2.2/egg-dist-tmp-zy8nd5d1
zip_safe flag not set; analyzing archive contents...
Moving gast-0.2.2-py3.7.egg to /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages
Adding gast 0.2.2 to easy-install.pth file

Installed /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages/gast-0.2.2-py3.7.egg
Searching for dataclasses
Reading https://pypi.org/simple/dataclasses/
Downloading https://files.pythonhosted.org/packages/e1/d2/6f02df2616fd4016075f60157c7a0452b38d8f7938ae94343911e0fb0b09/dataclasses-0.7-py3-none-any.whl#sha256=3459118f7ede7c8bea0fe795bff7c6c2ce287d01dd226202f7c9ebc0610a7836
Best match: dataclasses 0.7
Processing dataclasses-0.7-py3-none-any.whl
Installing dataclasses-0.7-py3-none-any.whl to /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages
Adding dataclasses 0.7 to easy-install.pth file

Installed /home/em/school/cpsc515/proj/env/lib/python3.7/site-packages/dataclasses-0.7-py3.7.egg
error: gast 0.2.2 is installed but gast>=0.3.2 is required by {'tensorflow-probability'}
jschwan2 commented 3 years ago

Currently have the same issue. Any fixes?

emsal0 commented 3 years ago

I had some mileage by using pip's new 2020 resolver. Activate by upgrading pip to the latest version and setting the flag --use-feature=2020-resolver.

jschwan2 commented 3 years ago

Thanks! The flag helped but now I'm receiving Illegal instruction when I import pilco. Is this happening for you?

emsal0 commented 3 years ago

Sorry for the late response, and sorry again that I'm not able to replicate that problem. I think there might be some work that needs to be done specifically for compatibility with GPflow 2.1, however

Pengxiao-Gao commented 3 years ago

Hello, i have also the same issue. Have you solved this problem?

nrontsis commented 3 years ago

I think that this has now been resolved. Feel free to reopen if you think it hasn't.