错误解决记录

情形:pip安装tensorlayer的时候出现错误

错误提示:

Cannot uninstall 'scikit-learn'. 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.

原因:

需要安装新版scikit-learn,但是现在已经安装了旧版本的scikit-learn,又因为旧版本依赖太多,不能清晰卸载。所安装新版scikit-learn失败,导致安装tensorlayer失败。。。有点饶。。。

解决:

    1.conda install scikit-learn

    2.pip install tensorlayer

用conda先安装scikit-learn,conda可以智能的卸载掉旧版本安装新版本,再安装tensorlayer就没有错误了


情形:import cv2 出现错误

错误提示:ImportError: /lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found

原因:因为安装了多个版本的libz,系统找不到正确的版本,需要我们手动指定一下

解决:

    1.sudo gedit .bashrc

    2.末尾添加 export LD_LIBRARY_PATH=/usr/local/anaconda/lib:$LD_LIBRARY_PATH (具体根据anconda的安装路径来)

    3.reboot重启



情形:

错误提示:

原因:

解决:



猜你喜欢

转载自blog.csdn.net/hsqyc/article/details/80957422