edward
edward copied to clipboard
constrain tensorflow version
When installing edward using the default method (pip install edward) and using the tensorflow versions specified in the setup.py (tensorflow>=1.2.0rc0), I get the following for some of the get started code:
ModuleNotFoundError: No module named 'tensorflow.contrib'
Since Tensorflow released a v2.0 that has a different API, looks like the tensorflow dependency should be constrained to be <2.0 as is done here. This seems to work as expected but https://github.com/blei-lab/edward/issues/882 is showing up when I run examples from the notebooks directory and elsewhere so perhaps this should be constrained further or that issue could be fixed in a separate PR.
Stacktrace
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last)~/.local/share/virtualenvs/ed-61OcBILj/lib/python3.7/site-packages/edward/init.py in
~/.local/share/virtualenvs/ed-61OcBILj/lib/python3.7/site-packages/edward/criticisms/init.py in
~/.local/share/virtualenvs/ed-61OcBILj/lib/python3.7/site-packages/edward/criticisms/evaluate.py in
11 with_binary_averaging
~/.local/share/virtualenvs/ed-61OcBILj/lib/python3.7/site-packages/edward/models/init.py in
~/.local/share/virtualenvs/ed-61OcBILj/lib/python3.7/site-packages/edward/models/dirichlet_process.py in
ModuleNotFoundError: No module named 'tensorflow.contrib'
+1 to this. This library didnt work on latest tensorflow 2.2+ and python3.8+. The older versions are missing links and so pip is also unable to find them. Best is to upgrade the library to work with latest python and tensorflow.