Python错误集锦:venv安装虚拟环境后再更改路径报错:Fatal error in launcher: Unable to create process using

原文链接:http://www.juzicode.com/archives/3051

错误提示:

在当前目录下创建了个python虚拟环境,新建在venv-python38-data目录下

D:\Python>python -m venv venv-python38-data

D:\Python>ls

将目录改名成了vPython38-data,这时报错Fatal error in launcher: Unable to create process using :

D:\Python\vPython38-data>
D:\Python\vPython38-data>
D:\Python\vPython38-data>cd Scripts

D:\Python\vPython38-data\Scripts>pip install six
Fatal error in launcher: Unable to create process using '"d:\python\venv-python38-data\scripts\python.exe"  "D:\Python\vPython38-data\Scripts\pip.exe" install six'

D:\Python\vPython38-data\Scripts>

错误原因:

1、这时试图运行pip命令,提示还是在原来的目录下找python,所以运行出错:

解决方法:

1、重新按照新文件夹名安装一次虚拟环境后,pip安装包ok:

D:\Python>python -m venv vPython38-data

D:\Python>cd vPython38-data\Scripts

D:\Python\vPython38-data\Scripts>pip install six
Collecting six
  Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Installing collected packages: six
Successfully installed six-1.15.0
WARNING: You are using pip version 19.2.3, however version 20.3.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注