Fatal error in launcher: Unable to create process using '"D:\Desktop\pycharm-projects\venv1\venv\Scripts\python.exe" "C:\Users\Xu Han\Desktop\pycharm-projects\venv1\venv\Scripts\pip.exe" list': ???????????
解决方法
在pycharm中,右击venv\Scripts这个文件夹,查找替换成现在的路径即可,如下:
然后重新安装pip,由于这里是虚拟环境,所以python -m ensurepip是不管用的
(venv) PS C:\Users\Xu Han\Desktop\pycharm-projects\venv1> python -m ensurepipLooking in links: c:\Users\XUHAN~1\AppData\Local\Temp\tmpr6ouww8yRequirement already satisfied: setuptools in c:\users\xu han\desktop\pycharm-projects\venv1\venv\lib\site-packages (60.2.0)Requirement already satisfied: pip in c:\users\xu han\appdata\local\programs\python\python39\lib\site-packages (23.1)
(venv) PS C:\Users\Xu Han\Desktop\pycharm-projects\venv1>python.exe-m pip install --upgrade pipLooking in indexes: https://pypi.tuna.tsinghua.edu.cn/simpleRequirement already satisfied: pip in c:\users\xu han\appdata\local\programs\python\python39\lib\site-packages (23.1)Collecting pip Using cached https://pypi.tuna.tsinghua.edu.cn/packages/47/6a/453160888fab7c6a432a6e25f8afe6256d0d9f2cbd25971021da6491d899/pip-23.3.1-py3-none-any.whl (2.1 MB)Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 23.1 Not uninstalling pip at c:\users\xu han\appdata\local\programs\python\python39\lib\site-packages, outside environment C:\Users\Xu Han\Desktop\pycharm-projects\venv1\venv Can't uninstall 'pip'. No files were found to uninstall.Successfully installed pip-23.3.1[notice] A new release of pip is available: 23.1 -> 23.3.1[notice] To update, run: python.exe -m pip install --upgrade pip