使用tensorboardX时出现如下问题

ImportError: dlopen(/Users/jains/anaconda2/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 6): Library not loaded: @rpath/libmklml.dylib
  Referenced from: /Users/jains/anaconda2/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
  Reason: image not found
Failed to load the native TensorFlow runtime.

 

1.很明显时tensorflow出现了问题,可能是其版本不匹配

采取措施:

卸载tensorflow并重新安装tensorflow

pip uninstall tensorflow
pip install tensorflow

2.然而此时出现新的问题:

thinc 6.12.0 has requirement wrapt<1.11.0,>=1.10.0, but you'll have wrapt 1.11.1 which is incompatible.

tensorboard 1.14.0 has requirement setuptools>=41.0.0, but you'll have setuptools 39.1.0 which is incompatible.

Installing collected packages: wrapt, google-pasta, tensorboard, tensorflow-estimator, tensorflow, h5py

  Found existing installation: wrapt 1.10.11

Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

 

wrapt和setuptools版本不对,卸载wrapt

pip uninstall wratp

3.又出现了问题:

Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

大概意思是:wrapt依赖不明确导致的

1.解决方案:

cd /Users/***/anaconda2/lib/python2.7/site-packages    #mac 下anaconda2
cd ***/anaconda2/Lib/site-packages    #Win下anaconda2

2.进入找到wrapt相关文件

wrapt-1.10.11-py2.7.egg-info

wrapt

3.然后备份或者删除,再重新安装wrapt即可

4.继续安装指定版本的setuptools

4.安装tensorflow

pip install tensorflow

Reference

你可能感兴趣的:(TensorFlow)