【发布时间】:2014-05-09 16:59:32
【问题描述】:
我正在尝试在 PyCharm 中导入 NLTK,并收到以下错误。我在 Mac OS 10.5.8 和 Python 2.7.6 上。会发生什么?我对编程完全陌生,如果我缺少一些基本的东西,很抱歉。
安装包失败:安装包 nltk 时出错。
执行了以下命令:
packaging_tool.py install --build-dir /private/var/folders/NG/NGoQZknvH94yHKezwiiT+k+++TI/-Tmp-/pycharm-packaging3166068946358630595.tmp nltk
命令的错误输出:
Downloading/unpacking nltk
Could not fetch URL https://pypi.python.org/simple/nltk/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
Will skip URL https://pypi.python.org/simple/nltk/ when looking for download links for nltk
Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
Will skip URL https://pypi.python.org/simple/ when looking for download links for nltk
Cannot fetch index base URL https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/nltk/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
Will skip URL https://pypi.python.org/simple/nltk/ when looking for download links for nltk
Could not find any downloads that satisfy the requirement nltk
Cleaning up...
No distributions at all found for nltk
Storing complete log in /Users/Tom/.pip/pip.log
ETA:好的,现在我已经从命令行成功安装了 NLTK,然后能够在 PyCharm 中安装它——但仅限于 Python 2.5.1 解释器。如果我尝试使用 Python 2.7.6,我仍然会收到上述错误。这有关系吗,还是我不应该担心它而只在 2.5.1 中使用它?
【问题讨论】: