问题描述
我正在尝试在 PyCharm 上导入 NumPy.
I'm trying to import NumPy on PyCharm.
我使用 PyCharm 终端和 Miniconda 启动了命令:
Using the PyCharm terminal and Miniconda I've launched the command:
conda install numpy
这是输出:
Fetching package metadata: ....
Solving package specifications: ....................
# All requested packages already installed.
# packages in environment at C:\Users\...\Miniconda3:
#
numpy 1.10.4 py35_0
所以我运行了我的项目,但终端说:
So I run my project but the terminal said:
ImportError: No module named 'numpy'
在我的项目栏上,我可以看到两个不同的文件夹,一个是我的项目,另一个是外部库.
On my project bar I can see two different folders, the one with my project and another one with the external libraries.
在 External libraries
>
Extendend definition
下有一个 NumPy 文件夹,所以我猜安装很顺利.
Under External libraries
>
Extendend definitions
there is a NumPy folder so I guess that the installation goes well.
推荐答案
转到
- ctrl-alt-s
- 点击项目:项目名称"
- 点击项目交互者
- 双击pip
- 从顶部栏中搜索 numpy
- 点击numpy
- 点击安装包按钮
如果它不起作用,这可以帮助您:
if it doesnt work this can help you:
https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html
这篇关于在 PyCharm 上导入 NumPy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!