我正在尝试在运行Rasbian Desktop的VMware机器上安装tensorflow。 我在tensorflow网站(https://www.tensorflow.org/install/install_raspbian#ValidateYourInstallation)上按照确切的步骤进行了操作,并在Raspberry Pi 3 B型上成功安装并运行。但是,当我在VM上尝试时,我遇到了问题... 这是我在VMware环境中尝试执行此操作时的细分过程。
sudo apt-get -y install libatlas-base-dev
系统返回
Reading package lists... Done
Building dependency tree
Reading state information... Done
libatlas-base-dev is already the newest version (3.10.3-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
然后
pip3 install --upgrade tensorflow
系统退回
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: tensorflow in /usr/local/lib/python3.5/dist-packages (0.11.0)
Requirement not upgraded as not directly required: six>=1.10.0 in /usr/lib/python3/dist-packages (from tensorflow) (1.10.0)
Requirement not upgraded as not directly required: protobuf==3.0.0 in /usr/local/lib/python3.5/dist-packages (from tensorflow) (3.0.0)
Requirement not upgraded as not directly required: numpy>=1.11.0 in /usr/local/lib/python3.5/dist-packages (from tensorflow) (1.14.5)
Requirement not upgraded as not directly required: wheel>=0.26 in /usr/lib/python3/dist-packages (from tensorflow) (0.29.0)
Requirement not upgraded as not directly required: setuptools in /usr/local/lib/python3.5/dist-packages (from protobuf==3.0.0->tensorflow) (40.0.0)
当我尝试通过简单地导入tensorflow库来验证使用Python3的安装时,它显示了此错误:
>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow.so: cannot open shared object file: No such file or directory
我不知道我在此过程中做错了什么。我希望有人可以帮助我。
谢谢