[英]Tensorflow on Python 64bit version not working
I have installed Python 3.9.1 and also installed a lot of packages, like sklearn, selenium, etc., but I am failing to install tensorflow.我已经安装了 Python 3.9.1 并且还安装了很多软件包,例如 sklearn、selenium 等,但我无法安装 tensorflow。 When I type in
pip install tensorflow
an error is thrown:当我输入
pip install tensorflow
时会抛出一个错误:
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow错误:找不到满足 tensorflow 要求的版本(来自版本:无)错误:未找到 tensorflow 的匹配分布
I read that I need to have the 64bit-Version of Python installed.我读到我需要安装 64 位版本的 Python。 I checked it using:
我使用以下方法检查了它:
import sys
print(sys.maxsize > 2**32)
which returned True
, what means I am using the 64bit-Version.返回
True
,这意味着我使用的是 64 位版本。 So why am I still getting this error?那么为什么我仍然收到此错误? And why do I get this error only with tensorflow?
为什么只有 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. 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. Therefore you would have to downgrade your Python version to one that is supported.因此,您必须将 Python 版本降级为受支持的版本。
Edit:编辑:
To setup the conda environment with tensorflow and the correct version of 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.