You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在PyCharm中安装NumPy?安装遇报错求助

Fixing Numpy Installation Failures with Python 3.6 & Pip 9.0.3

Hey there, let's work through this numpy installation issue you're hitting. Python 3.6 and pip 9.0.3 are both pretty outdated at this point, which is almost certainly part of the problem. Here's how to get it sorted:

Step 1: Upgrade Pip to a Python 3.6-Compatible Version

Pip 9.0.3 is too old to handle modern package index structures, and newer pip versions dropped support for Python 3.6. So we need to upgrade to the last pip version that works with 3.6:

python -m pip install --upgrade pip==20.3.4

This ensures pip can properly fetch and install packages without compatibility errors.

Step 2: Install a Numpy Version That Supports Python 3.6

The latest numpy releases no longer support Python 3.6, so you'll need to specify a compatible version. The last numpy version fully compatible with 3.6 is 1.19.5:

pip install numpy==1.19.5

Step 3: Fix PyCharm Interpreter Configuration

If you're still having issues in PyCharm, double-check that you're using the correct Python 3.6 interpreter:

  • Go to File > Settings > Project: [Your Project Name] > Project Interpreter
  • Make sure the selected interpreter is your Python 3.6 installation (not a newer version or misconfigured virtual environment)
  • You can also open PyCharm's built-in terminal and run the pip commands above directly in your project's environment.

Step 4: Fix Network/Timeout Issues

If you're getting download timeouts, use a domestic PyPI mirror to speed things up (this avoids slow international connection issues):

pip install numpy==1.19.5 -i https://pypi.tuna.tsinghua.edu.cn/simple

Step 5: Resolve Permission Problems

If you see permission errors:

  • On Windows: Open Command Prompt as Administrator before running the commands
  • On Linux/macOS: Add sudo before the pip command, or use the --user flag to install to your user directory:
pip install numpy==1.19.5 --user

The core issue here is that both Python 3.6 and pip 9.0.3 are end-of-life, so they don't play nicely with modern package repositories. By pinning to compatible versions of pip and numpy, you should be able to get everything installed smoothly.

内容的提问来源于stack exchange,提问作者fawad khan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 08:36:53