2

I followed tutorial here and used PIP to install tensorflow.

GPU version is installed and my python is 2.7.12. OS is Ubuntu 14.04.

The installation step is

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0rc2-cp27-none-linux_x86_64.whl

sudo pip install --upgrade $TF_BINARY_URL

Installation did well with the following message

I

Installing collected packages: six, protobuf, numpy, funcsigs, pbr, mock, tensorflow
Successfully installed funcsigs-1.0.2 mock-2.0.0 numpy-1.11.2 pbr-1.10.0 protobuf-3.0.0 six-1.10.0 tensorflow-0.11.0rc2

But when I tested, I had this error.

import tensorflow as tf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
    from tensorflow.python import *
  File "/usr/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/usr/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/usr/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: /usr/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: undefined symbol: PyUnicodeUCS4_AsUTF8String

What does it mean undefined symbol: PyUnicodeUCS4_AsUTF8String and how to solve?

batuman
  • 7,066
  • 26
  • 107
  • 229
  • 1
    This is the problem of numpy. numpy was built with usc2. I need to build with ucs4. Can check UCS version in this link (http://stackoverflow.com/questions/1446347/how-to-find-out-if-python-is-compiled-with-ucs-2-or-ucs-4). – batuman Nov 09 '16 at 04:36
  • 1
    Yes that was the solution after recompiling Python with this configurtion (sudo ./configure --prefix=/usr --enable-unicode=ucs4), tensorflow was successfully installed. – batuman Nov 09 '16 at 04:56
  • BTW, for all installation errors, we use [github](https://www.github.com/tensorflow/tensorflow/issues), so you might have a chance to have a longer-form conversation there. – drpng Nov 09 '16 at 17:24

0 Answers0