[英]pip doesn't work for me (I have python 3.9.7 installed) (Windows)
So, I have python 3.9.7 installed.所以,我安装了 python 3.9.7。 When I installed it, pip had also been installed.我安装的时候,pip也已经安装好了。
I checked if python is installed (Windows) using "python --version".我使用“python --version”检查了 python 是否已安装 (Windows)。 The Problem: When I try the same with pip;问题:当我尝试使用 pip 时; "pip --version", an error occurs saying that the program can't be executed (command prompt) “pip --version”,出现错误提示程序无法执行(命令提示符)
Does anyone know why?有谁知道为什么?
You can try to reinstall pip. This my solve the issue.您可以尝试重新安装 pip。这可以解决问题。 Use can either install it over command window with 'py -m ensurepip --upgrade' oder download the 'get-pip.py' file (check https://pip.pypa.io/en/stable/installation/ ).使用可以使用“py -m ensurepip --upgrade”通过命令 window 安装它,或者下载“get-pip.py”文件(检查https://pip.pypa.io/en/stable/installation/ )。
Try this first Did you added python to PATH?先试试这个你把 python 添加到 PATH 了吗? This is also important.这也很重要。 Check https://datatofish.com/add-python-to-windows-path/ to do so检查https://datatofish.com/add-python-to-windows-path/这样做
Make sure that the python version is the version of your intent.确保 python 版本是您的意图版本。
Windows python installer sometimes defaults to py
for newer python installations. Windows python 安装程序有时默认为py
用于较新的 python 安装。
python --version
Then try to install for example openpyxl
package, with admin access, if required然后尝试安装例如openpyxl
package,如果需要,具有管理员访问权限
python -m pip install openpyxl
Have you already tried pip3
?你已经尝试过pip3
吗?
pip3 install openpyxl
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.