Python3.6.4与PyCharm2017.3.3环境下TensorFlow安装失败求助
Hey Martin, let's break down why you're running into this installation error and walk through how to fix it. The core issue here is that modern TensorFlow versions don't support Python 3.6 anymore, and your older pip version might be struggling to find compatible packages. Here's what to do:
1. Understand version compatibility first
TensorFlow 2.3 and later dropped support for Python 3.6. The latest TensorFlow version that works with your Python 3.6.4 (64-bit) is TensorFlow 2.2.0 (for CPU) or the corresponding GPU variant. You can't install the latest TensorFlow directly—you need to specify this older, compatible version.
2. Upgrade pip to a Python 3.6-compatible version
Older pip versions can't properly resolve compatible package versions for Python 3.6. First, upgrade pip to the last version that supports Python 3.6:
Open Command Prompt and run:python -m pip install --upgrade pip==21.0.1
3. Install the matching TensorFlow version
For CPU-only installation
Run this command in Command Prompt or PyCharm's terminal:pip install tensorflow==2.2.0
For GPU installation (if you have an NVIDIA GPU set up with CUDA)
Make sure you have CUDA 10.1 and cuDNN 7.6.5 installed first, then run:pip install tensorflow-gpu==2.2.0
4. Verify PyCharm's interpreter setup
Double-check that PyCharm is using your Python 3.6.4 (64-bit) interpreter:
- Go to
File > Settings > Project: [Your Project Name] > Python Interpreter - Confirm the selected interpreter is Python 3.6.4 (64-bit). If not, click the gear icon in the top-right to add the correct interpreter path.
5. Fix network-related download issues (if you hit timeouts)
If you're having trouble downloading packages due to network restrictions, use a domestic PyPI mirror to speed things up. For example, using Tsinghua's mirror:pip install tensorflow==2.2.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
内容的提问来源于stack exchange,提问作者Martin W

