简体   繁体   English

Python 上的 Tensorflow 64 位版本不工作

[英]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.

相关问题 无法在具有 64 位 anaconda 的 64 位系统上使用 python 3.6 版本在 anaconda 上导入 tensorflow - Not able to import tensorflow on anaconda with python 3.6 version on 64bit system with 64bit anaconda 使用Python 3.6在Windows 64位上安装Tensorflow - Tensorflow installation on Windows 64bit with Python 3.6 Python:64位Numpy? - Python: 64bit Numpy? 使用64位Python创建的Python脚本可以在32位Python的相同版本上运行吗? - Can Python scripts created with 64bit Python be run on same version but 32 bit Python? Windows(64位)上的Python 2.7.8(64位)是Ubuntu(64位)上的2.7.8(64位)的一半 - Python 2.7.8 (64bit) on Windows (64bit) is half as fast as 2.7.8 (64bit) on Ubuntu (64bit) Python - 32 位版本与 64 位版本的位移 - Python - bitshifting with 32bit version vs 64bit versions 安装 tensorflow 时遇到问题(是的,我有 python 3.7.9 64 位) - Having problems installing tensorflow (Yes I have python 3.7.9 64bit) python 3.9.0(64位)和pip版本20.2.3中的tensorflow安装。? - tensorflow installation in python 3.9.0(64 bit) and pip version 20.2.3 .? 如何在 Python 更改 32 位 - > 64 位后让 Jupyter 工作 - How to get Jupyter working after Python change 32bit -> 64bit 如何在python 2.7 32bit中获得64bit进程的内存工作集? - How to get the memory working set of a 64bit process in python 2.7 32bit?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM