Bash: Pip: Command Not Found

bash: pip: command not found when using pip install ...

Try the following:

  • python -m pip install ....
  • python3 -m pip install ....
  • py3 -m pip install ....

As @S3DEV commented, there could be a problem with your path variables, so trying python before pip could solve. Those other variations (python3 and py) can also work.

Yet another `bash: pip: command not found`

Attempts to re-install or fix failed. So I removed pip completely and did what I hope is a clean install. First:

sudo apt-get remove --auto-remove python-pip 

Then delete pips caches and existing downloads, where appropriate (in my case, I left still working pips inside virtual environments alone):

sudo find / -type d -name 'pip*'
sudo rm -rf <dirname>

Then download the official pip installer and install it:

wget https://bootstrap.pypa.io/get-pip.py 
sudo python get-pip.py

Now pip freeze runs without errors. In addition:

  • the cause was that the pip-script was gone. After the re-install, it's there again: /usr/local/bin/pip. So what I thought:

    the bash shell must understand when to act as a python interpreter. Which it doesn't.

    is not right. The shell will launch a python script, if its shebang-line points to the proper interpreter. Learning all the time...

  • many sources suggest to sudo apt-get install python-pip. That's wrong. apt-get is several versions behind the current stable one. Mixing versions leads to all sorts of errors.

Python 'pip install' not working/recognised

You're running pip inside of Python. That's not how it should be used. Open a terminal and try

python -m pip install auto-py-to-exe

or

pip install auto-py-to-exe

python 2.7: cannot pip on windows bash: pip: command not found

On Windows, pip lives in C:\[pythondir]\scripts.

So you'll need to add that to your system path in order to run it from the command prompt. You could alternatively cd into that directory each time, but that's a hassle.

See the top answer here for info on how to do that:
Adding Python Path on Windows 7

Also, that is a terrifying way to install pip. Grab it from Christophe Gohlke. Grab everything else from there for that matter.
http://www.lfd.uci.edu/~gohlke/pythonlibs/

MSYS2: pip is not in path after installation (command not found)

As the documentation explains, the MSYS2 project consists of two sections: MinGW and MSYS proper. The differences between them are as follows:

  • MinGW packages are native Windows binaries that are themselves used to build native Windows software. They can be run independently from MSYS, although MSYS can ease their use, for example by providing a Unix-like shell scripting language.
  • (Proper) MSYS packages run in a virtual POSIX environment that serves as a build system meant to bootstrap the rest of MSYS2. It incorporates enough POSIX features (e.g. a familiar /bin, /lib, /etc, etc. directory structure) to allow porting software from Unix-like systems without having to extensively adapt it to the Windows platform. Development tools in the MSYS section are used to build software that depends on the MSYS environment.

The mingw-w64-x86_64-python-pip package belongs to the MinGW section. In order to use it, you need to launch a MinGW shell, so that you have access to the MinGW environment used to build native Windows software. If you want to have pip available in the MSYS shell, you need to install the MSYS package python-pip.

As for manually adding /mingw64/bin to your PATH: no, you are absolutely not supposed to do that. Mixing environments in this way is not supported; the whole point is for them to be separate.

sudo/conda/pip/PATH not found on Git Bash

You'll probably want to just run the regular windows installer (from the python site - https://www.python.org/downloads/) and then add the appropriate folder with the python and pip binaries to your $PATH system variable.

There are package managers like https://community.chocolatey.org/packages for windows, but as you can see they do not come as standard on windows.



Related Topics



Leave a reply



Submit