Intellij not finding Python modules installed via pip(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 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Intellij 找不到通过 pip 安装的 Python 模块
基础教程推荐
- Kivy 使用 opencv.调整图像大小 2022-01-01
- 究竟什么是“容器"?在蟒蛇?(以及所有的 python 容器类型是什么?) 2022-01-01
- 比较两个文本文件以找出差异并将它们输出到新的文本文件 2022-01-01
- Python 中是否有任何支持将长字符串转储为块文字或折叠块的 yaml 库? 2022-01-01
- 对多索引数据帧的列进行排序 2022-01-01
- matplotlib 设置 yaxis 标签大小 2022-01-01
- 在 Django Admin 中使用内联 OneToOneField 2022-01-01
- 在 Python 中将货币解析为数字 2022-01-01
- Python,确定字符串是否应转换为 Int 或 Float 2022-01-01
- kivy 应用程序中的一个简单网页作为小部件 2022-01-01
