試圖在Heroku上安裝tensorflow,到底it fails有:未定義的符號:PyUnicodeUCS4_FromStringAndSize與tensorflow在Heroku
pywrap_tensorflow.so: undefined symbol: PyUnicodeUCS4_FromStringAndSize
requirements.txt:
numpy
https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
安裝:
git push heroku master
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 327 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Using set buildpack heroku/python
remote: -----> Python app detected
remote: -----> Installing dependencies with pip
remote: Collecting numpy (from -r requirements.txt (line 1))
remote: Downloading numpy-1.10.1.tar.gz (4.0MB)
remote: Collecting tensorflow==0.5.0 from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl (from -r requirements.txt (line 2))
remote: Downloading https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl (10.9MB)
remote: Installing collected packages: numpy, tensorflow
remote: Running setup.py install for numpy
remote: Successfully installed numpy-1.10.1 tensorflow-0.5.0
remote:
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing... done, 54.8MB
remote: -----> Launching... done, v7
remote: https://jalapenocandy.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To [email protected]:jalapenocandy.git
9a2cc96..231788d master -> master
看起來不錯!不幸的是,當我嘗試:
heroku run bash
$python
python
Python 2.7.10 (default, May 27 2015, 20:38:41)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import tensorflow as tf
import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/app/.heroku/python/lib/python2.7/site-packages/tensorflow/__init__.py",
line 4, in <module>
from tensorflow.python import *
File "/app/.heroku/python/lib/python2.7/site-packages/tensorflow/python/__init
__.py", line 22, in <module>
from tensorflow.python.client.client_lib import *
File "/app/.heroku/python/lib/python2.7/site-packages/tensorflow/python/client
/client_lib.py", line 35, in <module>
from tensorflow.python.client.session import InteractiveSession
File "/app/.heroku/python/lib/python2.7/site-packages/tensorflow/python/client
/session.py", line 11, in <module>
from tensorflow.python import pywrap_tensorflow as tf_session
File "/app/.heroku/python/lib/python2.7/site-packages/tensorflow/python/pywrap
_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/app/.heroku/python/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: /app/.heroku/python/lib/python2.7/site-packages/tensorflow/python/_
pywrap_tensorflow.so: undefined symbol: PyUnicodeUCS4_FromStringAndSize
我能做些什麼嗎?
用tensorflow解決-0.6.0 – berak