Running tensorflow in ipython

tensorflow works using python in a virtualenv I created, but tensorflow doesn't work in the same virtualenv with ipython. This is the error I get:

Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name mock was given, but was not able to be found.

I have tried installing ipython within the virtual environment. This is the message I get:

Requirement already satisfied: ipython in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

If I try to uninstall ipython within the virtual environment. I get this message:

Not uninstalling ipython at /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

Any ideas on how to get this to work? I don't know how to force the install of ipython to be inside the virtual environment. I've tried deleting the virtual environment and making a new one from scratch, but I get the same error.

1 answer

  • answered 2018-02-14 00:02 plasmabrian

    I think I figured out the problem. pip was pointing to /Library/Frameworks/Python.framework/Versions/3.4/bin/pip

    My ipython was pointing to /opt/local/bin/ipython

    I re-installed tensorflow within my virtual environment by calling /opt/local/bin/pip-2.7 install --upgrade tensorflow

    Now I can use tensorflow within ipython.