virtualenv doesn't see my compiled tensorflow

ross at cgl.ucsf.edu ross at cgl.ucsf.edu
Fri Sep 1 17:39:06 EDT 2017


With the prebuilt version of tensorflow, I did:

   virtualenv --system-site-packages  ~/tensorflow

and somehow got it working with keras. Now I've compiled tensorflow in another shell/directory, where to start with I did:

   virtualenv --system-site-packages  .

and I got it running with keras on my net, with a nice speedup. Then I went back to my previous shell, did a deactivate, then

    virtualenv --system-site-packages ~/tf_compile/tensorflow

to point to the dir that was '.' above, but my prompt path did not pick up '(tensorflow)' as before:

    % virtualenv --system-site-packages ~/tf_compile/tensorflow
    New python executable in /Users/priot/tf_compile/tensorflow/bin/python
    Installing setuptools, pip, wheel...done.
    priot keras%

and I get:

% python prog.py
  ...
  File "/Users/ppp/anaconda/lib/python2.7/site-
  packages/keras/backend/tensorflow_backend.py", line 1, in <module>
    import tensorflow as tf
  ImportError: No module named tensorflow

Seems inconsistent.

% virtualenv --version
15.1.0

% python --version
Python 2.7.10 :: Anaconda custom (x86_64)

OS: OSx Darwin



More information about the Python-list mailing list