Fatal error in launcher: Unable to create process using '"'

一、问题

在windows10上通过pip安装requests报错

C:\Users\Administrator>pip install requests
Fatal error in launcher: Unable to create process using '"'

二、解决办法

前面加python -m

C:\Users\Administrator>python -m pip install requests
Requirement already satisfied: requests in c:\windows\lib\site-packages
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\windows\lib\site-packages (from requests)
Requirement already satisfied: certifi>=2017.4.17 in c:\windows\lib\site-packages (from requests)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in c:\windows\lib\site-packages (from requests)
Requirement already satisfied: idna<2.8,>=2.5 in c:\windows\lib\site-packages (from requests)
You are using pip version 18.0, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

这里提示pip需要更新,我们执行python -m pip install --upgrade pip命令更新:

C:\Users\Administrator>python -m pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 160kB/s
Installing collected packages: pip
  Found existing installation: pip 18.0
    Uninstalling pip-18.0:
      Successfully uninstalled pip-18.0
Successfully installed pip-19.0.3

更新成功后,再执行pip install requests,发现虽然提示已安装,但是已经不会报错了。

C:\Users\Administrator>pip install requests
Requirement already satisfied: requests in c:\windows\lib\site-packages (2.19.1)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in c:\windows\lib\site-packages (from requests) (1.23)
Requirement already satisfied: certifi>=2017.4.17 in c:\windows\lib\site-packages (from requests) (2018.8.24)
Requirement already satisfied: idna<2.8,>=2.5 in c:\windows\lib\site-packages (from requests) (2.7)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\windows\lib\site-packages (from requests) (3.0.4)
posted @ 2019-03-26 11:43  这个人在加班  阅读(1973)  评论(0编辑  收藏  举报