繁体   English   中英

Python 上的 Tensorflow 64 位版本不工作

[英]Tensorflow on Python 64bit version not working

我已经安装了 Python 3.9.1 并且还安装了很多软件包,例如 sklearn、selenium 等,但我无法安装 tensorflow。 当我输入pip install tensorflow时会抛出一个错误:

错误:找不到满足 tensorflow 要求的版本(来自版本:无)错误:未找到 tensorflow 的匹配分布

我读到我需要安装 64 位版本的 Python。 我使用以下方法检查了它:

import sys
print(sys.maxsize > 2**32)

返回True ,这意味着我使用的是 64 位版本。 那么为什么我仍然收到此错误? 为什么只有 tensorflow 才会出现此错误?

TensorFlow pip packages are compatible with Python 3.5–3.8 and not with Python 3.9 as of yet, this thread covers the discussion on the release date of a compatible version. 因此,您必须将 Python 版本降级为受支持的版本。

编辑:

使用 tensorflow 和正确版本的 Python 设置 conda 环境

conda create -n env_name python=3.8
conda activate env_name
conda install pandas scikit-learn matplotlib notebook ##installing usual Data Science packages that does include numpy and scipy 
pip install tensorflow
python -c "import tensorflow as tf;print(tf.__version__)" ##checks tf version

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM