Showing posts with label sys.stderr.write(f"ERROR: {exc}"). Show all posts
Showing posts with label sys.stderr.write(f"ERROR: {exc}"). Show all posts

Thursday, February 11, 2021

pip install error - sys.stderr.write(f"ERROR: {exc}")

If you are getting the following error while installing a pip package, this solution should work for you.

sys.stderr.write(f"ERROR: {exc}")

Solution :

A) If you are installing a pip package with default python (2.7) and getting above error, run following command


curl https://bootstrap.pypa.io/2.7/get-pip.py --output get-pip.py
python get-pip.py

B) If you are installing a pip package with python3 and you are installing a package using pip3 command, run following command


curl https://bootstrap.pypa.io/3.5/get-pip.py --output get-pip.py
python3 get-pip.py

Change the python version in url, it depends on your system's python version.

C)  If you are installing a pip package in a virtual environment with python3.5,  run following command in your virtual environment


curl https://bootstrap.pypa.io/3.5/get-pip.py --output get-pip.py
python3 get-pip.py
Command python or python3 both should work same in the virtual env.