Open jwenjian opened 4 years ago
linux环境下,安装pip3之后,执行了下面的命令:
wenjian@localdev:~/service$ pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U Collecting pip Downloading https://pypi.tuna.tsinghua.edu.cn/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl (1.4MB) 100% | 1.4MB 1.0MB/s Installing collected packages: pip Successfully installed pip-19.3.1
但是之后再执行 pip3 命令时,报下面的错:
pip3
wenjian@localdev:~/service$ pip3 Traceback (most recent call last): File "/usr/bin/pip3", line 9, in <module> from pip import main ImportError: cannot import name 'main'
执行下面这行命令即可:
wenjian@localdev:~/service$ python3 -m pip uninstall pip Uninstalling pip-19.3.1: Would remove: /home/wenjian/.local/bin/pip /home/wenjian/.local/bin/pip3 /home/wenjian/.local/bin/pip3.6 /home/wenjian/.local/lib/python3.6/site-packages/pip-19.3.1.dist-info/* /home/wenjian/.local/lib/python3.6/site-packages/pip/* Proceed (y/n)? y Successfully uninstalled pip-19.3.1
linux环境下,安装pip3之后,执行了下面的命令:
但是之后再执行
pip3
命令时,报下面的错:解决方案
执行下面这行命令即可: