Intellij 找不到通过 pip 安装的 Python 模块 [英] Intellij not finding Python modules installed via pip

查看:29
本文介绍了Intellij 找不到通过 pip 安装的 Python 模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过 sudo pip install nltk 安装了 nltk 包,它工作正常:

I have installed the nltk package via sudo pip install nltk and it works fine:

21:07:00/~ $python -c "import nltk"

为了确保与 brew pip 没有冲突,我也这样做了:

Just to be sure there were no clashing with brew pip I also did:

21:06:24/~ $python -m pip install nltk
Requirement already satisfied: nltk in /usr/local/lib/python2.7/site-packages
Requirement already satisfied: six in /usr/local/lib/python2.7/site-packages (from nltk)

所以 brew 和 system python 在一起很开心.

So both brew and system python are happy together.

Intellij 是另一回事.基本的 python 正在运行,但 pip 安装的库是 MIA:

Intellij is another story. The basic python is working but the pip installed libraries are MIA:

以下是相关的 SDK 设置:

Here are the relevant SDK settings:

模块级别:

项目级别:

那么,这个项目需要什么才能让 pip 库受到欢迎?

So what is needed in this project to have pip libraries welcomed?

推荐答案

切换到 brew 安装的 python 解决了这个问题.

Switching to the brew installed python fixed the issue.

现在 nltk 正在解析:

这篇关于Intellij 找不到通过 pip 安装的 Python 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆