pip[3] command not found even though pip is installed - python

I want to run this script:
pip3 install -r requirements.txt
However, when I run it I get the error message
-bash: pip3: command not found
I have already installed brew and pip. When I run
pip3 -V
I get pip 19.0.3 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
Does anybody know why I am getting that error message?
If it helps, I am trying to run this program in the end

pip is for python2 version.
pip3 is for python3 version you should install python3 interpreter for pip3 and provide in environment variables.

run this command, if you are woring on python3.
pip3 install -r requirements.txt
from you error code it looks like you are running pip[3] , which is wrong.
for python2, you can run
pip install -r requirements.txt

Related

how to fix a broken pip install? [duplicate]

This question already has answers here:
My pip is broken on Windows, how can I fix it?
(3 answers)
Closed 1 year ago.
C:\WINDOWS\system32>python -m pip install -U --force pip
C:\Python39\python.exe: No module named pip
I broke my pip install trying to update it and am unsure how to fix it
I think you accidentally delete pip or did not install it, my suggestion is to reinstall pip by
Download get-pip.py and "Save As" the file using right-click.
Open a command prompt as an administrator
cd to the path where you saved the file, in my case
python get-pip.py
cd C:\Users\xyz\Downloads> then type python get-pip.py. It will install all required packages, such as wheel and pip.
To check if it was installed correctly, type pip --version in the command line.
Before downloading pip firstly check pip already installed or not. For checking open cmd type
pip help
if it responce than pip installed already.
For downloading pip then, run the following command in cmd to download the get-pip.py file:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
To install PIP run the following command in cmd :
python get-pip.py
for confirming whether pip installed or not than again type
pip help
if it responce than pip successfully installed.
To check the current version of PIP,enter the following in the cmd:
pip --version
To upgrade PIP on Windows, enter the following in the cmd:
python -m pip install --upgrade pip
This command uninstalls the old version of PIP and then installs the most current version of PIP.
It seems like you do not have pip module in your system.
I recommend to download python again and you will have the newest possible version of pip. Or you may use "pip help" command

How to install pip globally on Ubuntu 20.04, so that all users can use it the same way?

I set up a VMware machine under Windows 10, running Ubuntu 20.04.
The first thing I did after the installation was to install pip:
sudo apt install python3-pip
I then did:
sudo pip3 install --upgrade pip3
to which I got an error saying that the package pip3 doesn't exist. So I did:
sudo pip3 install --updgrade pip
which finished and installed pip 21.0.1
Now if I run pip3 with sudo, I have to type sudo pip3, but for a non-root user I have to use pip insted of pip3
sudo pip3 --version and sudo pip --version and pip --version return the same:
pip 21.0.1 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)
But pip3 --version returns: bash: /usr/bin/pip3: No such file or directory
I just want to use the command pip3 both with and without root privilige and I don't understand what's happening here.
bash: /usr/bin/pip3: No such file or directory
This is because bash still remembers where it saw pip3 last time and the place was changed from /usr/bin/pip3 to /usr/local/bin/pip3. To clear its memory run hash -r. See command hash in bash manual.

Cannot run pip/pip3 command OS X

When trying to install scikit-learn I encountered an error:
$ pip3 install scikit-learn
-bash: pip3: command not found here
$ pip install scikit-learn
-bash: pip3.4: command not found
How do I resolve this? I've already tried uninstalling pip and reinstalling it via python3, but nothing seems to work.
Pip3, however, does still seem to be installed on my machine:
$ locate pip3
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/python/py-pip/files/pip33
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/python/py-pip/files/pip34
/usr/local/Cellar/python3/3.4.3/bin/pip3
/usr/local/Cellar/python3/3.4.3/bin/pip3.4
/usr/local/Cellar/python3/3.5.0/bin/pip3
/usr/local/Cellar/python3/3.5.0/bin/pip3.5
/usr/local/Cellar/python3/3.5.1/bin/pip3
/usr/local/Cellar/python3/3.5.1/bin/pip3.5
/usr/local/bin/pip3
/usr/local/bin/pip3.5

Where exactly is pip installed?

I know the newer versions of python come with pip installed. So 'sudo apt-get install python3-pip' gives me that it is installed saying that it is the latest version, then why does 'pip install django' gives an error saying pip is not insatlled? Namely this:
The program 'pip' is currently not installed. You can install it by typing:
sudo apt-get install python-pip
I again run 'sudo apt-get install python-pip' (for python 2.7) which installs version 1.5. So i try pip install -U pip and it downloads the package marked 7.1 and succesfully installs. However on checking the version again it is still 1.5
You can install pip with the help of get-pip.py script.
you can download this script and execute on your terminal "python get-pip.py".
it will install pip on your system.
you can also use curl to download get-pip.py script-
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py".
To verify the installation you can use-
pip --help
pip -V

Pip install results in error "no such option: -E"

I just cleaned up my mac after a mavericks install (yeah, i'm late to the party).
I'm using homebrew Python but I've confirmed this error with the stock apple python as well. I've got pip 1.5.6 installed system-wide and also in my virtualenv.
I can pip-sys install for system-wide pip installs no problem. When In a virtualenv though, I get the following error, even with which pip.
pip install -U -r requirements/dev.pip
Usage:
pip <command> [options]
no such option: -E
Seems there is something wrong with the pip install within the virtualenv. Pip is not working but pip2 install works fine. So maybe there's a version conflict where pip installs thinking it's a different python version from what was installed.
To recap
pip install south
fails with above error
pip2 install south
works fine.

Categories

Resources