我有 python 3.8.0(在 Windows PC 上)
当我尝试运行时: pip install selenium
我收到以下错误:
Fatal error in launcher: Unable to create process using '"c:\python38\python.exe" "C:\Python38\Scripts\pip.exe" install selenium': The system cannot find the file specified.
python pip install selenium
和 py pip install selenium
都给我这个错误:
can't open file 'pip': [Errno 2] No such file or directory
pip3 install selenium
:
Fatal error in launcher: Unable to create process using '"c:\python38\python.exe" error: "C:\Python38\Scripts\pip3.exe" install selenium': The system cannot find the file specified.
当我运行时: python -m pip --version
我得到:
pip 20.0.2 from C:\Users\<UserName>\AppData\Local\Programs\Python\Python38\lib\site-packages\pip (python 3.8)
我在尝试安装 django 时也遇到了同样的问题。
原文由 Freddie Mercury 发布,翻译遵循 CC BY-SA 4.0 许可协议
您的输出:
C:\Users\\AppData\Local\Programs\Python\Python38\lib\site-packages\pip
,让我觉得您弄乱了 pip 安装。要恢复,请执行以下操作:
python -m pip install -U --force pip
(这将修复您的 pip 安装)pip install -U --force selenium
这应该有助于解决问题。