I am trying to install TensorFlow on PyCharm in Project > Python Interpreter
to meet the requirement of the TF Developer Certificate exam.
My computer is Windows 10. On the Python Console
, I print the python version:
>>> print(sys.version)
3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)]
Then I go to File > Settings > Project > Python Interpreter > Available Packages
, find and install the Tensorflow package. I install the default version which is 2.2.0
. My pip
version is 20.1.1
.
But I cannot install it, it displays this error:
Error occurred:
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
Command output:
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
I have searched for this solution but I cannot find anything that helps me solve it. Does anyone know how to fix this? Thanks.
Update: When I install the TF in my cmd, it installs successfully.
C:\Users\User>pip show tensorflow
Name: tensorflow
Version: 2.2.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: c:\users\user\anaconda3\lib\site-packages
Requires: six, google-pasta, wrapt, astunparse, gast, wheel, scipy, absl-py, numpy, tensorboard, termcolor, grpcio, h5py, keras-preprocessing, tensorflow-estimator, protobuf, opt-einsum
Required-by:
Update 2:
I follow this set up instruction by TF: Link
Update 3:
So I tried to install via package location but it doesn't work (Python 3.7 CPU-only):
pip install https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.2.0-cp37-cp37m-win_amd64.whl
Error:
ERROR: tensorflow_cpu-2.2.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
Update 4:
I create a new project, then use conda
environment to install TF. Then it works.
But I still don't understand why using normal venv
, it cannot install.
Update 5:
Everything works fine on Ubuntu when following the instruction by TF.
I had this issue when I was trying to use TensorFlow on Windows 10 while having multiple versions of Python installed.
What I did was uninstall all versions except the most updated one. If I needed an older version I would use Conda virtual environment.
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.