Mac安装错误
Created by: DrRyanHuang
您好,我是 《百度架构师手把手带你零基础实践深度学习》的一名助教
学员按照按照官网的quickstart
python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
安装了paddle,安装过程中一切正常
但是一旦调用paddle
>>> import paddle
ImportError: dlopen(/Users/apple/anaconda3/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so, 2): Symbol not found: _kCVImageBufferTransferFunction_ITU_R_2100_HLG
Referenced from: /Users/apple/anaconda3/lib/python3.6/site-packages/cv2/.dylibs/libavcodec.58.91.100.dylib (which was built for Mac OS X 10.13)
Expected in: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
in /Users/apple/anaconda3/lib/python3.6/site-packages/cv2/.dylibs/libavcodec.58.91.100.dylib
会出现这样的问题,折腾了半天,重新安装openCV才可以使用
pip install opencv-python -i https://mirror.baidu.com/pypi/simple
在解决问题的途中,甚至出现了NameError : name 'batch' is not defined
: (我手打的,见谅)
XXXX/paddle/__init__.py in <module>()
33 import paddle.compat
34 import paddle.distributed
-> 35 batch = batch.batch
36 XXXX
37 XXXX
NameError : name 'batch' is not defined
他的mac系统是:10.12.6
paddle在安装过程中会依赖cv2吗?会自动安装cv2?导致了学员的环境中出现了版本不匹配的cv2? 是不是这里出了问题呢?
这是学员的github: https://github.com/garfieldsun