简体   繁体   中英

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. When I type in pip install tensorflow an error is thrown:

ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow

I read that I need to have the 64bit-Version of Python installed. I checked it using:

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

which returned True , what means I am using the 64bit-Version. So why am I still getting this error? And why do I get this error only with 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. Therefore you would have to downgrade your Python version to one that is supported.

Edit:

To setup the conda environment with tensorflow and the correct version of Python

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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