Pip安装在终端机中工作,但在Pycharm中打包了吗?

问题描述 投票:0回答:2

[好吧,我正在尝试在Pycharm中安装各种软件包,例如pandas和NumPy,并通过Terminal(我在Mac上)安装了它们,没有问题,我可以在pip列表中列出它们-

enter image description here

然后,当我去Pycharm并执行import时,出现错误

ModuleNotFoundError:没有名为“ pandas”的模块

我尝试了Pycharm设置并在那里安装了软件包,但是随后我得到了-enter image description here

这里怎么了?

python terminal pip pycharm
2个回答
0
投票

使用import语句执行代码时,您可能在pycharm中使用了错误的解释器。检查设置>项目>项目解释器,并确保选择了正确的解释器。


0
投票

您需要在pyCharm中进行一些配置,包括为python选择适当的解释器。

检查此链接https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html

© www.soinside.com 2019 - 2024. All rights reserved.