I found a great Medium article on creating a new neural network architecture that I wanted to try out. Of course, I get to the training part, and things start to fail.
I can't import TensorFlow. Whenever I do, I get the error
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/myusername/.virtualenvs/worldmodels/lib/python3.5/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import * # pylint: disable=redefined-builtin File "/home/myusername/.virtualenvs/worldmodels/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow File "/home/myusername/.virtualenvs/worldmodels/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 25, in <module>
from tensorflow.python.platform import self_check ImportError: No module named 'tensorflow.python.platform'
Well, I looked at this which suggested importing in a different folder which did not work. I also tried exporting the PYTHONPATH
variable, set to PYTHONPATH="/home/London/.virtualenvs/worldmodels/lib/python3.5/site-packages"
and PYTHONPATH="${PYTHONPATH}:/usr/local/lib/python2.7/dist-packages/"
and PYTHONPATH="/usr/local/lib/python2.7/dist-packages/"
, all to no avail.
This one seemed to be a language issue, which shouldn't be my problem (and if it is, I don't know what they did to fix it.)
This one gave the same folder changing advice. This one seemed to be an issue with someone's command, not just trying to import it. And this one again suggests the setting PYTHONPATH
. (And yes, I did see this one, but both the question and answer quality are lacking.)
Any ideas as to what I could do to get TensorFlow up and running?
(Maybe using a different install process than just pip? I have already tried installing by running sudo pip install tensorflow
. I would still like to be able to use it with the Medium tutorial though.)