window10下用anaconda3安装python3.8 opencv4.5.5,tensorflow2.6版本。或使用纯安装实现

1.最新版anaconda3都自带python3.10版本,但只想用python3.8版本,所以要找最后python3.8的anconda3版本安装。进过多次下载试安装,确定为Anaconda3 2021.05 windows -x86_64版本

添加清华镜像源:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/
conda config --show channels
或者在
C:\Users\chenxi\.condarc文件里直接加入

删除--default据说可以加速,不知道是不是真的

2.安装opencv
conda install -c conda-forge opencv
Solving environment: /一直卡在这里下不去

只能换用这种方式:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  opencv-python

2.安装tensorflow,官网直接下载
tensorflow_cpu-2.6.0-cp38-cp38-win_amd64.whl包安装

3.安装其他一些要用的库

pip install pynvml
pip install reportlab
pip install pdfrw
pip install filterpy
出现:
cannot import name ‘dtensor’ from 'tensorflow.compat.v2.experimental’报错
环境 cuda11.2 tensorflow2.6 python 3.9
报错是因为keras版本太高,需要降低到和tensorflow版本一致,pip install keras==2.6,降低keras版本就好了。

4. 安装pyinstaller并使用:

#应该把“D:\anaconda3\envs\xxxx\Library\bin”添加到环境变量中

#anconda3虽然内部已安装scikit-learn,pyqt5,但奇怪的是在pyinstaller时还是提示一些错误,重新安装即可;

pyinstaller打包好后的应用程序有1.98个G

-----------------------------------------------------------------------

纯安装实现:

1.python官网下载3.8.10版本,其他竟然没有3.8.13的安装包

2.清华共享源下载opencv,tensorflow,pyqt5的whl包安装

3.余下的用pip安装

pip install pyfilter
pip install pyyaml
pip install psutil
pip install qt_material

 python程序运行时提示**410.dll库找不到,需要去微软网站下载VC_redist_x64.exe安装包安装

4.安装pyinstaller,并打包,应用程序有1.08个G
 

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值