Reputation: 77
I followed the instruction as
https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#on-macosx
for mac installation.
After installation I navigate to python and tried to import Tensorflow and got following problems.
(tensorflow) min:~ min$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/codeback/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/Users/codeback/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 29, in <module>
import ctypes
File "//anaconda/lib/python2.7/ctypes/__init__.py", line 10, in <module>
from _ctypes import Union, Structure, Array
ImportError: dlopen(/Users/codeback/tensorflow/lib/python2.7/lib- dynload/_ctypes.so, 2): Symbol not found: __PyInt_AsInt
Referenced from: /Users/codeback/tensorflow/lib/python2.7/lib-dynload/_ctypes.so
Expected in: flat namespace
in /Users/codeback/tensorflow/lib/python2.7/lib-dynload/_ctypes.so
guys I'm new to installing tensorflow. so I need detail explanation thank you
Upvotes: 0
Views: 587
Reputation: 641
This seems to be an issue with pyenv. Following these instructions should clear things up.
Reverting the change to pyenv will get existing built extension modules working again, but won't solve the problem the pyenv change was intended to address: binary compatibility with prebuilt Mac OS X and manylinux1 wheel files published to PyPI.
On Linux, the following command will rebuild all of the modules in an environment (don't run it directly against your system Python!):
$ pip freeze | pip install --ignore-installed --no-use-wheel -r /dev/stdin
Upvotes: 2