mac下python3安装pip和opencv

1.首先安装python3

 安装时提示缺少文件,从 子目录中拷贝:

cp ./Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/six.py  ./Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/

2.修改profile文件,设置默认使用python3:

export PYTHON2=/usr/bin/python
export PYTHON3=/usr/local/bin/python3
export PATH=$PATH:$PYTHON2:$PYTHON3
alias python='$PYTHON3'

3.安装pip,和opencv

wget https://bootstrap.pypa.io/get-pip.py

sudo python3 get-pip.py

sudo python3 -m pip install opencv-python

你可能感兴趣的:(video,tools)