pip3 install
is not working and also pip3 is not being able to downgrade to pip19 from pip20.0:
Rayaans-MacBook-Pro:~ rayaangrewal$ pip3 install
under project name go to following file in virtual enviroment. venv\Lib\site-packages\pip_internal\distributions__init__.py comment out the very first line which reads.
then install pip version desired.
curl https://bootstrap.pypa.io/get-pip.py | sudo python3
The above fix fixed the issue for me
Install a new version of pip fixes it:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
Good answers in @pdh's link to github issues.
When using venv in Python 3.6+ on Ubuntu/LXC with a self-install/self-upgrading pip command during execution, you can use get-pip.py
instead:
Activate the virtual environment venv: source bin/activate
Now, instead of the self-updating pip command (which does not work in pip 0.20.0): bin/pip3 install --upgrade pip
You can use:
cd bin
# downloading get-pip.py each time; but you could also remove it from here
# and run this manually only once:
wget https://bootstrap.pypa.io/get-pip.py -O ./get-pip.py
# definitely keep this command:
python3 get-pip.py
cd ..
Result:
Collecting pip
...
Installing collected packages: pip
Found existing installation: pip 20.0.0
Uninstalling pip-20.0.0:
Successfully uninstalled pip-20.0.0
Successfully installed pip-20.0.1
Notes to get-pip.py
:
install
, --upgrade
, --force-reinstall
setuptools
and wheel
by default unless specifically disabled with --no-setuptools
or --no-wheel
GET-PIP.PY WARNING
In light of the friendly error message WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
, one can instead replace point 3. above with:
bin/python3 -m pip install -U pip [setuptools] [wheel] [--no-cache-dir]
This is a bug in pip
20.0; see https://github.com/pypa/pip/issues/7620
It's fixed in pip
20.0.1. Upgrade to 20.0.1+ or downgrade to 19.3.1. Get get-pip.py and run
python get-pip.py
or
python get-pip.py pip==19.3.1