Home > database >  pip doesn't work for me (I have python 3.9.7 installed) (Windows)
pip doesn't work for me (I have python 3.9.7 installed) (Windows)

Time:10-03

So, I have python 3.9.7 installed. When I installed it, pip had also been installed.

I checked if python is installed (Windows) using "python --version". The Problem: When I try the same with pip; "pip --version", an error occurs saying that the program can't be executed (command prompt)

Does anyone know why?

CodePudding user response:

You can try to reinstall pip. This my solve the issue. 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/).

Try this first Did you added python to PATH? This is also important. Check https://datatofish.com/add-python-to-windows-path/ to do so

CodePudding user response:

Make sure that the python version is the version of your intent.
Windows python installer sometimes defaults to py for newer python installations.

python --version

Then try to install for example openpyxl package, with admin access, if required

python -m pip install openpyxl 

Have you already tried pip3?

pip3 install openpyxl
  • Related