Я установил новую жизненную среду python3.6 через Pycharm, после установки tenorflow и соответствующих пакетов я попытался импортировать его, но имел следующие ошибки:
(env) zwang@mrt223:~/workspace/models-master/research$ python3
Python 3.6.8 (default, Oct 7 2019, 12:59:55)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
File "/home/zwang/env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/zwang/env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/zwang/env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: /home/zwang/env/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN6google8protobuf8internal26fixed_address_empty_stringE
Во время обработки вышеуказанногоисключение, произошло другое исключение:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/zwang/env/lib/python3.6/site-packages/tensorflow/__init__.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/home/zwang/env/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/zwang/env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/zwang/env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/zwang/env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/zwang/env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: /home/zwang/env/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN6google8protobuf8internal26fixed_address_empty_stringE
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
мой список пипсов выглядит следующим образом:
(env) zwang@mrt223:~$ pip list
Package Version
----------------------------- -------
absl-py 0.8.1
actionlib 1.12.0
angles 1.9.11
astor 0.8.0
bondpy 1.8.3
camera-calibration 1.13.0
camera-calibration-parsers 1.11.13
catkin 0.7.19
controller-manager 0.15.1
controller-manager-msgs 0.15.1
cv-bridge 1.13.0
cycler 0.10.0
diagnostic-analysis 1.9.3
diagnostic-common-diagnostics 1.9.3
diagnostic-updater 1.9.3
dynamic-reconfigure 1.6.0
gast 0.3.2
gazebo-plugins 2.8.4
gazebo-ros 2.8.4
gencpp 0.6.2
geneus 2.2.6
genlisp 0.4.16
genmsg 0.5.12
gennodejs 2.0.1
genpy 0.6.9
geodesy 0.5.3
google-pasta 0.1.8
grpcio 1.25.0
h5py 2.10.0
image-geometry 1.13.0
interactive-markers 1.11.4
kdl-parser-py 1.13.1
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
kiwisolver 1.1.0
laser-geometry 1.6.4
Markdown 3.1.1
matplotlib 3.1.1
message-filters 1.14.3
numpy 1.17.3
Pillow 6.2.1
pip 19.0.3
protobuf 3.10.0
pyparsing 2.4.4
python-dateutil 2.8.1
python-qt-binding 0.3.6
qt-dotgraph 0.3.15
qt-gui 0.3.15
qt-gui-cpp 0.3.15
qt-gui-py-common 0.3.15
resource-retriever 1.12.5
rosbag 1.14.3
rosboost-cfg 1.14.7
rosclean 1.14.7
roscreate 1.14.7
rosgraph 1.14.3
roslaunch 1.14.3
roslib 1.14.7
roslint 0.11.2
roslz4 1.14.3
rosmake 1.14.7
rosmaster 1.14.3
rosmsg 1.14.3
rosnode 1.14.3
rosparam 1.14.3
rospy 1.14.3
rosservice 1.14.3
rostest 1.14.3
rostopic 1.14.3
rosunit 1.14.7
roswtf 1.14.3
rqt-action 0.4.9
rqt-bag 0.4.12
rqt-bag-plugins 0.4.12
rqt-console 0.4.8
rqt-dep 0.4.9
rqt-graph 0.4.10
rqt-gui 0.5.0
rqt-gui-py 0.5.0
rqt-image-view 0.4.13
rqt-launch 0.4.8
rqt-logger-level 0.4.8
rqt-moveit 0.5.7
rqt-msg 0.4.8
rqt-nav-view 0.5.7
rqt-plot 0.4.9
rqt-pose-view 0.5.8
rqt-publisher 0.4.8
rqt-py-common 0.5.0
rqt-py-console 0.4.8
rqt-reconfigure 0.5.0
rqt-robot-dashboard 0.5.7
rqt-robot-monitor 0.5.9
rqt-robot-steering 0.5.9
rqt-runtime-monitor 0.5.7
rqt-rviz 0.6.0
rqt-service-caller 0.4.8
rqt-shell 0.4.9
rqt-srv 0.4.8
rqt-tf-tree 0.6.0
rqt-top 0.4.8
rqt-topic 0.4.10
rqt-web 0.4.8
rviz 1.13.5
sensor-msgs 1.12.7
setuptools 41.6.0
six 1.13.0
smach 2.0.1
smach-ros 2.0.1
smclib 1.8.3
tensorboard 1.14.0
tensorflow 1.14.0
tensorflow-estimator 1.14.0
termcolor 1.1.0
tf 1.12.0
tf-conversions 1.12.0
tf2-geometry-msgs 0.6.5
tf2-kdl 0.6.5
tf2-py 0.6.5
tf2-ros 0.6.5
tf2-sensor-msgs 0.6.5
topic-tools 1.14.3
unique-id 1.0.6
urdfdom-py 0.4.1
Werkzeug 0.16.0
wheel 0.33.6
wrapt 1.11.2
xacro 1.13.4
Я дважды переустанавливал тензор потока, но это не помогло, что я мог сделать, чтобы решить эту проблемупроблема? Пожалуйста, помогите ..