安装软件包时,模块“ ssl”没有属性“ OPENSSL_VERSION”错误

时间:2018-07-03 08:31:03

标签: python python-3.x pip install packages

我无法再安装软件包。

每次我尝试运行:

py -m pip install [name of the package]

我得到:

Traceback (most recent call last):
  File "C:\Users\Filippo Sebastio\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\Filippo Sebastio\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Filippo Sebastio\Anaconda3\lib\site-packages\pip\__main__.py", line 19, in <module>
    sys.exit(_main())
  File "C:\Users\Filippo Sebastio\Anaconda3\lib\site-packages\pip\_internal\__init__.py", line 246, in main
    return command.main(cmd_args)
  File "C:\Users\Filippo Sebastio\Anaconda3\lib\site-packages\pip\_internal\basecommand.py", line 264, in main
    timeout=min(5, options.timeout)) as session:
  File "C:\Users\Filippo Sebastio\Anaconda3\lib\site-packages\pip\_internal\basecommand.py", line 81, in _build_session
    insecure_hosts=options.trusted_hosts,
  File "C:\Users\Filippo Sebastio\Anaconda3\lib\site-packages\pip\_internal\download.py", line 338, in __init__
    self.headers["User-Agent"] = user_agent()
  File "C:\Users\Filippo Sebastio\Anaconda3\lib\site-packages\pip\_internal\download.py", line 125, in user_agent
    data["openssl_version"] = ssl.OPENSSL_VERSION
AttributeError: module 'ssl' has no attribute 'OPENSSL_VERSION'

我不知道发生了什么,但恐怕我删除了ssl脚本的一部分(我什至不确定如何打开它!)

0 个答案:

没有答案