【问题标题】:exceptions import SSLError, InsecurePlatformWarning when using pip, python3.4 win32使用 pip、python3.4 win32 时出现异常导入 SSLError、InsecurePlatformWarning
【发布时间】:2015-09-02 20:44:21
【问题描述】:

我安装了 Python 3.4.0,但无法使用 pip。然后我从 python.org 安装了 pip。然后我设置PATH。 当我使用 pip 时,它会报告这些:

  C:\Users\think\Downloads\pip-7.1.2>pip
    Traceback (most recent call last):
      File "C:\Python34\lib\runpy.py", line 171, in _run_module_as_main
        "__main__", mod_spec)
      File "C:\Python34\lib\runpy.py", line 86, in _run_code
        exec(code, run_globals)
     ...
  File "C:\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\conn
ectionpool.py", line 33, in <module>
    from .connection import (
  File "C:\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\conn
ection.py", line 41, in <module>
    from .util import (
  File "C:\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\util
\__init__.py", line 5, in <module>
    from .ssl_ import (
  File "C:\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\util
\ssl_.py", line 4, in <module>
    from ..exceptions import SSLError, InsecurePlatformWarning
ImportError: cannot import name 'InsecurePlatformWarning'

Win32上的Python3.4.0

【问题讨论】:

标签: python pip


【解决方案1】:

请确保您正在运行安装在您的 python 版本的包含路径中的 pip 模块。

您可以通过python -m pip install &lt;somemodule&gt; 执行此操作。如果失败,您可能没有正确的模块。

另外,您可能只想使用python -m pip install --user &lt;somemodule&gt;为当前用户安装模块

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-10-30
    • 2015-07-04
    • 1970-01-01
    • 1970-01-01
    • 2013-11-29
    • 1970-01-01
    • 2015-06-30
    • 1970-01-01
    相关资源
    最近更新 更多