machrisaa / tensorflow-vgg

VGG19 and VGG16 on Tensorflow
2.21k stars 1.08k forks source link

ImportError: undefined symbol: PyClass_Type #44

Closed porridgeshoes closed 6 years ago

porridgeshoes commented 6 years ago

when I try to load module vgg19.py,it comes to this error: import tensorflowvgg.vgg19

Traceback (most recent call last):

File "", line 1, in import tensorflowvgg.vgg19

File "/home/yan/下载/tensorflowvgg/vgg19.py", line 2, in import tensorflow as tf

File "/usr/local/lib/python2.7/dist-packages/tensorflow/init.py", line 23, in from tensorflow.python import *

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/init.py", line 45, in from tensorflow.python import pywrap_tensorflow

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in _pywrap_tensorflow = swig_import_helper()

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)

File "/home/yan/anaconda3/lib/python3.6/imp.py", line 242, in load_module return load_dynamic(name, filename, file)

File "/home/yan/anaconda3/lib/python3.6/imp.py", line 342, in load_dynamic return _load(spec)

ImportError: /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so: undefined symbol: PyClass_Type

my python version is: Python 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:09:58)

machrisaa commented 6 years ago

There should be something wrong with your installation of the Tensorflow or Python. Please raise it in the developer forum instead.