今天繼續(xù)在虛擬機上搭建tensorflow環(huán)境。
遇到了幾個問題:
1、“IOError: [Errno 13] Permission denied:”ubuntu的權(quán)限問題,最后用一行“sudo su"解決了。
2、起初錯裝了gpu的tensorflow(https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/),可以成功安裝但無法調(diào)用會報錯。
{Traceback (most recent call last):
? File "", line 1, in
? File "/home/ge/.local/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in
? ? from tensorflow.python import *
? File "/home/ge/.local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in
? ? from tensorflow.python import pywrap_tensorflow
? File "/home/ge/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in
? ? raise ImportError(msg)
ImportError: Traceback (most recent call last):
? File "/home/ge/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in
? ? from tensorflow.python.pywrap_tensorflow_internal import *
? File "/home/ge/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
? ? _pywrap_tensorflow_internal = swig_import_helper()
? File "/home/ge/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
? ? _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions.? Include the entire stack trace
above this error message when asking for help}
3、關(guān)于pip install -i:
? ? pip install tensorflow -i?https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/tensorflow-1.3.0rc0-cp27-none-linux_x86_64.whl
與
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ ? https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/tensorflow-1.3.0rc0-cp27-none-linux_x86_64.whl
這兩個是不一樣的的一個就會報錯,第二才是從指定地方安裝包的方法。
(剛開始,沒看清課件,寫錯了,郁悶了老會。要認真啊?。?/p>