Solution: remember to run the 'activate' script: % source ~/tf_compile/tensorflow/bin/activate
On Friday, September 1, 2017 at 2:39:33 PM UTC-7, ro...@cgl.ucsf.edu wrote: > 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 -- https://mail.python.org/mailman/listinfo/python-list