簡體   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