简体   繁体   English

pip 对我不起作用(我安装了 python 3.9.7)(Windows)

[英]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.

相关问题 我用 pip 安装了 OpenGL python 库,但是当我尝试使用 PyCharm 导入它时它不起作用 - I installed OpenGL python library with pip, but it doesn't work when I tried to import it using PyCharm 通过pip安装的Python3脚本不起作用 - Python3 script installed with pip doesn't work 我有 pip 安装了 pydub 但仍然没有工作 - I have pip installed pydub but still didn't work py.test --version不起作用,并且在我已经安装pytest时出现错误 - py.test --version doesn't work and gives me the error while I have already installed pytest 我安装了 python 但 pip 不工作 - I have python installed but pip isn't working 即使我安装了 pip,Matplotlib 也无法在 python 中工作 - Matplotlib won't work in python even though i pip installed it 如何将我的 Python 代码(其中有 pip 模块)发送给没有安装 Python 的朋友? - How can I send my Python Code (Which has pip modules) to a friend who doesn't have Python installed? pip在Windows 8(Python 3.4)上的Eclipse中不起作用 - pip doesn't work in Eclipse on Windows 8 (Python 3.4) 我已经在pip中上传了一个Python包,然后pip安装了这个包,但是我在Python Interpreter中无法导入这个包 - I have uploaded a Python package in pip, then pip installed this package, but I can't import this package in Python Interpreter 我可以在未安装python的Windows 7计算机上以Sublime Text 2运行Python吗? - Can I run Python in Sublime Text 2 on a Windows 7 machine that doesn't have python installed?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM