Installation issue

Trying to setup Edward on Mac using the GAN tutorial.

git:(master) ✗ pip install edward
Collecting edward
  Downloading edward-1.2.4-py2-none-any.whl (57kB)
    100% |████████████████████████████████| 61kB 1.6MB/s
Requirement already satisfied: numpy>=1.7 in /Library/Python/2.7/site-packages (from edward)
Requirement already satisfied: six>=1.10.0 in /Library/Python/2.7/site-packages (from edward)
Installing collected packages: edward
Successfully installed edward-1.2.4
git:(master) ✗ python main.py
Traceback (most recent call last):
  File "main.py", line 10, in <module>
    import edward as ed
  File "/usr/local/lib/python2.7/site-packages/edward/__init__.py", line 5, in <module>
    from edward import criticisms
  File "/usr/local/lib/python2.7/site-packages/edward/criticisms/__init__.py", line 5, in <module>
    from edward.criticisms.evaluate import *
  File "/usr/local/lib/python2.7/site-packages/edward/criticisms/evaluate.py", line 9, in <module>
    from edward.models import RandomVariable
  File "/usr/local/lib/python2.7/site-packages/edward/models/__init__.py", line 5, in <module>
    from edward.models.dirichlet_process import *
  File "/usr/local/lib/python2.7/site-packages/edward/models/dirichlet_process.py", line 7, in <module>
    from edward.models.random_variable import RandomVariable
  File "/usr/local/lib/python2.7/site-packages/edward/models/random_variable.py", line 7, in <module>
    from tensorflow.python.client.session import \
ImportError: cannot import name register_session_run_conversion_functions

Thanks for raising this.

Can you report your TensorFlow version? From the troubleshooting page (http://edwardlib.org/troubleshooting), you need TensorFlow between 1.0.0a0 and 1.0.1. I think that import error occurs if you have something like TensorFlow <=0.7. In any case, updating to the latest TensorFlow will solve it.

1 Like

Ah got it, thanks! Do you know when support for 1.1.0 be merged in?

We’ll officially support 1.1.0 when it becomes a stable and not pre- release.

Hi. I’m also getting a similar issue with my installation of edward. Here’s the message I get. I checked my version of tensorflow - currently have version 1.3.0 installed so I’m not sure what the problem is

Traceback (most recent call last):
File “”, line 1, in
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/edward/init.py”, line 5, in
from edward import criticisms
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/edward/criticisms/init.py”, line 5, in
from edward.criticisms.evaluate import *
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/edward/criticisms/evaluate.py”, line 9, in
from edward.models import RandomVariable
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/edward/models/init.py”, line 5, in
from edward.models.dirichlet_process import *
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/edward/models/dirichlet_process.py”, line 7, in
from edward.models.random_variable import RandomVariable
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/edward/models/random_variable.py”, line 11, in
raise ImportError("{0}. Your TensorFlow version is not supported.".format(e))
ImportError: cannot import name register_session_run_conversion_functions. Your TensorFlow version is not supported.

1 Like

Are you sure your TF install works correctly? Try the following in terminal:

print(tf.__version__)
from tensorflow.python.client.session import \
      register_session_run_conversion_functions
1 Like

I get an error when I try both these commands:

print(tf.version)
Traceback (most recent call last):
File “”, line 1, in
AttributeError: ‘module’ object has no attribute ‘version

from tensorflow.python.client.session import register_session_run_conversion_functions
Traceback (most recent call last):
File “”, line 1, in
ImportError: cannot import name register_session_run_conversion_functions

However, when I try the examples shown on the tensorflow website where you start a session and print a message etc, these seem to work without any errors.

1 Like