当前位置: 移动技术网 > IT编程>脚本编程>Python > Tensorflow 2.3.0 cpu python3.8 win10 安装避坑指南

Tensorflow 2.3.0 cpu python3.8 win10 安装避坑指南

2020年08月10日  | 移动技术网IT编程  | 我要评论
1、pip install 下载太慢解决方案:到pypi官网找到对应的.whl 使用迅雷下载,之后pip install 即可。2、某文件夹非空导致安装失败OSError: [WinError 145] 目录不是空的。: 'C:\\Users\\Dylan\\AppData\\Local\\Temp\\pip-install-r067vo9i\\tensorflow\\tensorflow\\include\\external\\llvm-project\\mlir\\lib\\Dialect\\Qu
1、pip install 下载太慢

解决方案:到pypi官网找到对应的.whl 使用迅雷下载,之后pip install 即可。

2、某文件夹非空导致安装失败
OSError: [WinError 145] 目录不是空的。: 'C:\\Users\\Dylan\\AppData\\Local\\Temp\\pip-install-r067vo9i\\tensorflow\\tensorflow\\include\\external\\llvm-project\\mlir\\lib\\Dialect\\Quant'

文件目录确实是空的呀,奇怪! 再次执行一遍 pip install 试试!

解决方案:暂时不知道,重新pip install 一下!

3、找不到指定版本的依赖包
ERROR: Could not find a version that satisfies the requirement h5py<2.11.0,>=2.10.0 (from tensorflow==2.3.0) (from versions: none)
ERROR: No matching distribution found for h5py<2.11.0,>=2.10.0 (from tensorflow==2.3.0)

解决方案:
1、到pypi官网下载指定的版本!

疑问:无法下载的原因是找不到2.11.0,可要求下载的是 >=2.10 即可,而2.10.0 是有的,系统为何不下载2.10.0呢????
2、更换国内镜像源

4、更换pip镜像出现如下问题:

  ERROR: Cannot unpack file C:\Users\Dylan\AppData\Local\Temp\pip-unpack-z7rpphgh\simple
 (downloaded from C:\Users\Dylan\AppData\Local\Temp\pip-req-build-gwms93x1, content-type
: text/html; charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\Dylan\AppData\Local\Temp\pip-req-buil
d-gwms93x1

解决方案:
手敲命令敲错了。。。 直接使用tuna官方的指令即可!!!

https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
5、导入tensorflow2 出现这个错误:
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 页面文件太小,无法完成操作。

解决方案:tensorflow底层使用C++写的,需要安装相应的库。推荐使用360软件管家安装很省时间!

在这里插入图片描述

安装成功啦!!!完结撒花~~~~~

本文地址:https://blog.csdn.net/Markfieraloha/article/details/107878736

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网