一、工具下载
anaconda下载地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
我下载的是Anaconda3-2020.02-Windows-x86_64.exe版本。
二、工具安装
一路点就可以,在最后阶段可能有点慢,耐心等待。
三、配置环境变量
python:D:\Anaconda3-2020.02-Windows-x86_64\Anaconda3
pip:D:\Anaconda3-2020.02-Windows-x86_64\Anaconda3\Scripts
模块:D:\Anaconda3-2020.02-Windows-x86_64\Anaconda3\Library\bin
以上信息都需要添加到Path中,注意 ; 的问题。验证时,需要重启窗口。
验证,win + r 输入cmd ,重新打开窗口,输入python,出现>>>,即代表成功。
四、CV2 库安装
pip install opencv-python
或:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ opencv-python
提示如图:
五、打包exe,pyinstaller安装
参考:https://blog.csdn.net/baidu_39372836/article/details/90111574
需要注意,直接执行
pip install pyinstaller 可能会有问题,
需要加参数 -i,与跳转的网址,百度搜索 阿里源参考(https://www.cnblogs.com/lpxspring/p/12094033.html)
eg:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ pyinstaller
如图: