我有给定的Python代码,可在PyCharm的venv中使用。
from keras.applications.resnet50 import ResNet50
from keras.preprocessing import image
from keras.applications.resnet50 import preprocess_input, decode_predictions
import numpy as np
print (np.__version__)
该代码引发以下异常:
File "type.pxd", line 9, in init mtrand
ValueError: builtins.type has the wrong size, try recompiling. Expected 840, got 864
PyDev console: starting.
Python 3.5.0a4 (v3.5.0a4:413e0e0004f4, Apr 19 2015, 18:01:47) [MSC v.1900 64 bit (AMD64)] on win32
我已经看过this similar topic 我升级了说明中的所有内容:
pip install --upgrade numpy
pip install --upgrade scipy
pip install --upgrade pandas
还有目前不需要的特定熊猫版本。
pip install pandas==0.13.1
我仍然遇到相同的异常。你还有其他建议吗? 预先感谢