Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac virtualenv: TensorFlow Mechanics 101 failure #392

Closed
shirriff opened this issue Dec 2, 2015 · 1 comment
Closed

Mac virtualenv: TensorFlow Mechanics 101 failure #392

shirriff opened this issue Dec 2, 2015 · 1 comment
Assignees

Comments

@shirriff
Copy link
Contributor

shirriff commented Dec 2, 2015

When I try to run the Mechanics 101 tutorial on a Mac using virtualenv, it fails with:

$ python fully_connected_feed.py
Traceback (most recent call last):
File "fully_connected_feed.py", line 31, in
from tensorflow.g3doc.tutorials.mnist import input_data
ImportError: No module named g3doc.tutorials.mnist

To reproduce:
$ virtualenv --system-site-packages ~/tensorflow
$ source ~/tensorflow/bin/activate
$ pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
$ python, running "hello world" test: works fine
$ python -m tensorflow.models.image.mnist.convolutional: works fine

First problem:
$ python -c 'import site; print "\n".join(site.getsitepackages())'
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'getsitepackages'

Expected behavior: should print path, according to instructions at http://www.tensorflow.org/get_started/os_setup.html#run-a-tensorflow-demo-model
This seems to be a problem with virtualenv: See pypa/virtualenv#228

Second problem:
Download fully_connected_feed.py
$ python fully_connected_feed.py
Traceback (most recent call last):
File "fully_connected_feed.py", line 31, in
from tensorflow.g3doc.tutorials.mnist import input_data
ImportError: No module named g3doc.tutorials.mnist

Expected behavior: should run MNIST according to instructions at http://www.tensorflow.org/tutorials/mnist/tf/index.html#tutorial-files

I suspect some sort of path problem, but due to the first problem I can't figure out the right path.

System:
MacBook Pro (Retina, 15-inch, Early 2013)
OS X El Capitan, version 10.11.1 (15B42)
Python 2.7.10 (default, Aug 22 2015, 20:33:39)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin

@vrv vrv self-assigned this Dec 2, 2015
@vrv
Copy link

vrv commented Dec 15, 2015

This should be fixed in our 0.6.0 release.

@vrv vrv closed this as completed Dec 15, 2015
darkbuck pushed a commit to darkbuck/tensorflow that referenced this issue Jan 23, 2020
…pstream-deven-misc-changes-190403

Misc minor changes (-march=haswell, enable _gpu tests in one XLA dir, etc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants