相关疑难解决方法(0)

升级pip后出错:无法导入名称'main'

每当我尝试使用pip安装任何软件包时,我收到此导入错误:

guru@guru-notebook:~$ pip3 install numpy
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'
Run Code Online (Sandbox Code Playgroud)


guru@guru-notebook:~$ cat `which pip3`
#!/usr/bin/python3
# GENERATED BY DEBIAN

import sys

# Run the main entry point, similarly to how setuptools does it, but because
# we didn't install the actual entry point from setup.py, don't use the
# pkg_resources API.
from pip import main
if __name__ == '__main__':
    sys.exit(main())
Run Code Online (Sandbox Code Playgroud)

它之前工作正常,我不知道为什么它会抛出这个错误.我搜索了这个错误,但找不到任何解决方法.

如果您需要任何进一步的细节,请告诉我,我会更新我的问题.

python pip

441
推荐指数
11
解决办法
33万
查看次数

ImportError:在windows7 32位中运行pip --version命令时无法导入名称main

我安装了最新的python(2.7.9)捆绑了pip和setuptools for windows 32-bit.我已经尝试重新安装pip,但问题仍然存在.

这是pip --version在Administrator cmd中运行后的错误:

Traceback (most recent call last):
 File "D:\Python\lib\runpy.py", line 162, in _run_module_as_main
  "__main__", fname, loader, pkg_name)
 File "D:\Python\lib\runpy.py", line 72, in _run_code 
  exec code in run_globals
 File "D:\Python\Scripts\pip.exe\__main__.py", line 5, in <module>
ImportError: cannot import name main
Run Code Online (Sandbox Code Playgroud)

python pip importerror

141
推荐指数
6
解决办法
12万
查看次数

pip始终无法通过ssl验证

Pip总是失败,即使我做pip install dedupepip install --trusted-host pypi.python.org dedupe

无论如何,输出总是相同的:

收集重复数据删除

重试(重试(总计= 4,连接=无,读取=无,重定向=无,状态=无))连接被"SSLError"破坏后(SSLError(1,'[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败(_ssl.c: 777)'),)':/ simple/dedupe/
Retrying ...

跳绳

找不到满足需求重复数据删除的版本(来自版本:)没有找到重复数据删除的匹配分布

所以我卸载了anaconda并重新安装了它.一样.

你认为问题是我的_ssl.c文件(我不知道它在哪里)必须是腐败的还是什么?为什么pip需要引用,如果我告诉它绕过ssl验证呢?

ssl pip

14
推荐指数
5
解决办法
2万
查看次数

无法在Ubuntu Linux中使用pip安装Python软件包:InsecurePlatformWarning,SSLError,tlsv1警报协议版本

以前我曾经通过pip安装软件包,但是现在我试图使用pip安装Python库,但遇到SSL错误:

 /home/teleduce/.virtualenvs/teleduce_handler/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
 /home/teleduce/.virtualenvs/teleduce_handler/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections …
Run Code Online (Sandbox Code Playgroud)

python ubuntu ssl pip python-2.7

5
推荐指数
1
解决办法
4445
查看次数

标签 统计

pip ×4

python ×3

ssl ×2

importerror ×1

python-2.7 ×1

ubuntu ×1