python3.8及以上安装tensorflow及keras方法
综述
- 对于不兼容本地python版本的库安装时会报错:
ERROR: tensorflow-2.4.1-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
为了解决这个问题,我们的检查措施是查看本地python支持的文件名及版本
2. tensorflow仅支持python3.7及以下的版本,对于不想退版本的用户来说,可以采用从阿里云下载的方法安装对应高版本的tensorflow
检查本地python支持所能安装的库
在cmd中运行以下代码
python -m pip debug --verbose
我们下面的结果得到支持版本:
本机支持最高版本是cp38-cp38-win_amd64;
python3.8及以上安装tensorflow的方法
- 阿里云python库镜像地址:https://mirrors.aliyun.com/pypi/simple
- 安装方法
2.1 pip安装
cmd中运行
pip install --index-url https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com/ tensorflow
pip原始语句
pip install --index-url https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com/
2.2 自行下载对应版本后使用pip安装
pip install + 你下载的文件地址
如:
pip install E:\Anaconda\Lib\tensorflow_gpu-2.0.0-cp37-cp37m-win_amd64.whl
方法拓展-解决pip下载的环境错误
对于本机microsoft visual c++ 的版本不支持的pip下载也可使用本方法
例如:
"error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-buil d-tools/"
可使用本方法解决,已实验验证可行。
解释
本质是由于直接下载whl文件规避了使用microsoft visual c++文件包,所以还有很多人解决这个问题的方法是进python包的官网下载对应的whl文件后安装。
文件下载地址链接 https://matplotlib.org/downloads.html
具体步骤参见:pip安装库文件matplotlib失败(基本都可以解决)https://blog.csdn.net/qq_39586922/article/details/103008544
Original: https://blog.csdn.net/catslikefishes/article/details/121578606
Author: catslikefishes
Title: 【python 3.8 tensorflow】python3.8及以上安装tensorflow及keras方法Original: https://blog.csdn.net/catslikefishes/article/details/121578606
Author: catslikefishes
Title: 【python 3.8 tensorflow】python3.8及以上安装tensorflow及keras方法

max30100心率血氧健康传感器调试总结备忘

tensorflow中的图像编解码,画框操作

tensorflow:Not creating XLA devices, tf_xla_enable_xla_devices not set

推荐系统如何用TensorFlow实现经典的深度学习模型(Embedding+MLP)

多智能体深度强化学习——MADDPG算法代码分析(tensorflow)

将conda 虚拟环境添加到 Jupyter lab内核

相机标定、相机姿态和单目视觉测距

halcon深度学习

【预训练语言模型】KG-BERT: BERT for Knowledge Graph Completion

Mac M1 安装配置TensorFlow-GPU

语义分割系列7-Attention Unet(pytorch实现)

Tensorflow是干什么的?基础入门(安装配置、项目和应用开发、组件和工作原理)

单节点pyspark-tensorflow-jupyter notebook配置教程(以使用LSTM算法预测比特币价格的案例程序为例)

人工智能 基于机器学习的AI语音识别(ASRT) (一)环境搭建
