简体   繁体   English

Pip 安装在终端中有效,但 Pycharm 中没有包?

[英]Pip install works in terminal but packages arent there in Pycharm?

Ok, I'm trying to install various packages like pandas and NumPy in Pycharm, and via Terminal (I'm on a mac), they are installed without issues and I can list them with pip list - Ok, I'm trying to install various packages like pandas and NumPy in Pycharm, and via Terminal (I'm on a mac), they are installed without issues and I can list them with pip list -

在此处输入图像描述

Then, however, when I go to Pycharm and do an import , I get the error然后,但是,当我 go 到 Pycharm 并执行import时,我收到错误

ModuleNotFoundError: No module named 'pandas' ModuleNotFoundError:没有名为“熊猫”的模块

I tried the Pycharm settings and installing the package there, but then I get-我尝试了 Pycharm 设置并在那里安装 package,但后来我得到- 在此处输入图像描述

What is wrong here?这里有什么问题?

Interpreter:口译员:

在此处输入图像描述

You are probably using the wrong interpreter within pycharm when executing the code with the import statement.在使用 import 语句执行代码时,您可能在 pycharm 中使用了错误的解释器。 Check settings > project > project interpreter and make sure that the correct interpreter is selected.检查设置 > 项目 > 项目解释器并确保选择了正确的解释器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM