pip doesn't work even after add to environmental variable windows - python

I installed pip with get-pip.py, and it seemed that it was done successfully, and I added environmental variables. However, pip doesn't work (not recognized as internal or external command).
It doesn't work even if I write on the command line:
"C:\Users...\python-3.7.1-embed-amd64\Scripts\pip.exe" install numpy
I use windows 10, python 3.7, and i don't have admin rights. I edited user variables, also i asked admin to edit system environmental variables, but it didn't helped.
In case write path to pip.exe manually in the command line, it doesn't work as well.
(Pip and other expected files present in the Script folder!)
env path
pip install

To install packages, you need admin rights.
Start "cmd" as administrator.
Write your command
If you get error like:
Not recognized as internal or external command
if you get this error when you write "help" or other system commands, try start cmd using another way.
else, write not:
pip install package
but:
py -m pip install package
if you need python shell:
py

Related

Why do I have to use "py" to execute python commands instead of "python"?

I am a newbie in Python and had a problem with installing Python packages on my windows computer.
I installed Python itself and then had to install the packages "Numpy" and "Matplotlib" as well. My teacher told us to do it with the commands:
python -m pip install --upgrade pip
pip install numpy
pip install matplotlib
I managed to install Python but when I run the first command to install pip I got the error message telling me that Python is not found. I found the command py -m pip --version here and it worked. After running it pip got installed and I got the message "pip 22.3 from C:\Users\Kaja\Programs\Python\Python310\lib\site-packages\pip (python 3.10)". I guessed this message means that its working.
I had a similar problem with the commands to install Numpy and Matplotlib. It only worked with this commands
py -m pip install numpy
py -m pip install matplotlib
I searched the internet and found this question telling me to run the command doskey py=python and it did not work. But when I swapped py and python so that the command was doskey python=py I eventually could run my teachers commands.
I checked the windows documentation and they are using the same commands as my teacher. I am very curious to know why I had this problem because on my fellow students computers it worked without the doskey command.
Edit:
Thank you very much #RustyPython.
I checked my environment variables and the path to the python.exe was already there.
Out of curiousity I deleted the python.exe from the path variable and although I did that the commands still worked! Another thing I tried was to remove the doskey macro like discribed in this article but still the commands still run without any errors.
I think its something else.
When you install python on windows it usually comes with the python launcher. This provides a way to easily access all the python versions installed on your computer.
The python launcher uses the py command which access the default python version.
py -0p will show you all the installed versions.
See https://www.infoworld.com/article/3617292/how-to-use-pythons-py-launcher-for-windows.html for more details.
For the python command to work then the relevant directory containing python.exe needs to be added to your user PATH variable.
As has been said looks the the python directory is not on your PATH, but the python launcher is and finds the installed python.exe.
If you want python to work on command line then you'll need to add it to your PATH variable. https://realpython.com/add-python-to-path/#how-to-add-python-to-path-on-windows

Python pip installation not working how to do?

I keep trying to install Pip using get-pip.py and only get the wheel file in the scripts folder. Try running "pip" in the command prompt and it just comes out with an error. Running windows 8 incase you need.
edit error is 'pip' is not recognized as an internal or external command...
Use:
python -m pip (command) (option)
Do not use ()
If you are using latest version of Python.
In computer properties, Go to Advanced System Settings -> Advanced tab -> Environmental Variables
In System variables section, there is variable called PATH. Append c:\Python27\Scripts (Note append, not replace)
Then open a new command prompt, try "pip"
Try navigating to ~/Python[version]/Scripts in cmd, then use pip[version] [command] [module] (ie. pip3 install themodulename or pip2 install themodulename)

Python 2.7 Pip module not installing or setting paths via cmd?

I've been having some really odd issues with trying to install and use the Python "Pip" module. Firstly, I've installed the pip module by downloading the getpip.py file and running it which has replaced my pre existing pip which seemed to work fine. However whenever I try to use pip it always comes up with "pip is not recognized as an internal or external command" etc. I've set the path for python by using setx PATH "%PATH%;C:\Python27\python" and then using C:\Python27\Scripts\pip the second time to try and set the path for pip. But one of these seem to work. I can't use pip in cmd neither can I now use python.
Does anyone know how to make this work? I'm trying to run this command "pip install -r requirements.txt " even in the right folder but pip is not recognized. Any suggestions? Thanks.
You're using the wrong path, Pip should reside in the Scripts sub directory, set PATH to C:\Python27\Scripts then you should restart cmd.

Using pip Python 2.7 - Pipe not recognized as an internal or external command

I am trying to install Pillow-2.7.0-cp27-none-win32.whl
I read it is necessary to use the pip to install such file extension.
So I downloaded python 2.7 which already comes with pip installed.
However when I try to execute the following command:
pip install Pillow-2.7.0-cp27-none-win32.whl
command prompt returns:
pip is not recognized as an internal or external command
EDIT
I tried the following solution:
'pip' is not recognized as an internal or external command
But the message result is the same
You need to add the directory containing pip.exe to your PATH. It is usually found in C:\<PythonInstallDir>\Scripts, probably C:\Python27\Scripts unless the installation method has changed recently. The method of editing your PATH varies slightly amongst Windows versions, so Google it with your particular version if you don't already know how to do it.
You can try using py -m pip install pillow in the Command Prompt/PowerShell

'easy_install' is not recognized as an in internal or external command, operable program or batch file

I have just downloaded and installed the latest version of Python on my Windows 7 machine.
Python 2.7.3
Now I want to install a Twitter library I found online:
However when I try to run easy_install tweepy, I get this error message:
'easy_install' is not recognized as an in internal or external
command, operable program or batch file.
Python has already been placed into my path, as I can invoke the Python program into the command line.
Here is a screenshot of my folder where Python is installed.
And inside the Tools folder:
And inside the scripts folder:
You need to:
Install easy_install: http://pypi.python.org/pypi/setuptools
Add C:\Python27\Scripts to your PATH
I had the same issue with Python 3.4. Fixed it with the steps below:
cd C:\Python34\Scripts
.\easy_install pip
(or what you need to install)
with the .\ you sort of grant admin permissions to the command
I think that you should set the 'PATH' variable in order to execute it
Looks like easy-install is not itself installed on your system.
See this previous question for instructions on installing.
Basics official python packages need to be installed
You can install packages via the command line by entering:
python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
0.Install easy_install
1.search for "edit the system environment variables" in search.
2.click environment variables.
3.under "system variables" click "path" and click edit.
4.click "new".
5.go back and copy the path where python package(easy_install) is installed and paste it there.
6.click ok everything.
7.check now it works...

Categories