Closed izLHC closed 8 years ago
There seems to be a misconfiguration on this machine causing python3 to look for Python code in the 2.7 directories. It's hard for us to help with this, as it is probably not related to TensorFlow specifically. I will close this issue. If you find evidence that there is a problem with TensorFlow, feel free to reopen it.
We have a RedHat7 machine where our sysadmin, per my request, has installed TF 0.9.0 for both python2.7 and python3.4. Both versions of python are installed centrally under /usr/bin.
When installing, he followed the "pip install" instructions from the TF page for CPU-only 64-bit 2.7 and 3.4 installs.
For both me and him, importing tenserflow in python2.7 works fine.
For him, importing TF in python3.4 works fine as well.
But for me, it generates an error. For some reason, it attempts to load the 2.7 version of the TF package. For him, it loads the 3.4 version as expected.
When I ran the command
python3 -v -c 'import tensorflow'
, I get, among other things, this:# /usr/lib/python2.7/site-packages/tensorflow/__pycache__/__init__.cpython-34.pyc matches /usr/lib/python2.7/site-packages/tensorflow/__init__.py
# code object from '/usr/lib/python2.7/site-packages/tensorflow/__pycache__/__init__.cpython-34.pyc'
# /usr/lib/python2.7/site-packages/tensorflow/python/__pycache__/__init__.cpython-34.pyc matches /usr/lib/python2.7/site-packages/tensorflow/python/__init__.py
# code object from '/usr/lib/python2.7/site-packages/tensorflow/python/__pycache__/__init__.cpython-34.pyc'
When he runs the same command, he gets:
# /usr/lib/python3.4/site-packages/tensorflow/__pycache__/__init__.cpython-34.pyc matches /usr/lib/python3.4/site-packages/tensorflow/__init__.py
# code object from '/usr/lib/python3.4/site-packages/tensorflow/__pycache__/__init__.cpython-34.pyc'
# /usr/lib/python3.4/site-packages/tensorflow/python/__pycache__/__init__.cpython-34.pyc matches /usr/lib/python3.4/site-packages/tensorflow/python/__init__.py
# code object from '/usr/lib/python3.4/site-packages/tensorflow/python/__pycache__/__init__.cpython-34.pyc'
PYTHONPATH
is defined for neither of us.Why is there this difference and how can it be fixed?
Thank you!