Pip command line "ImportError: No Module Named Typing"
Solution 1:
Running this line in a Mac terminal fixed it for me:
/usr/local/opt/[email protected]/bin/python3.9 -m pip install --upgrade pip
I had the same issue. I also first tried the pip3 install pygame
which was previously mentioned, before running this line. You may have to do that first. For the individual who said to try
pip install typing
that line of code will simply produce the same error. To fix it, you have to use to the aforementioned command(s).
Solution 2:
I also ran into the same problem, because I made the foolish mistake of upgrading pip as suggested by Python.
I fixed this by downloading get_pip.py
for python3.4 at https://bootstrap.pypa.io/pip/3.4/get-pip.py and running it:
python get_pip.py
It will automatically download the latest compatible version of pip (19.1.1 in this case).
Solution 3:
Do the following:
sudo apt update
sudo apt-get upgrade
If there is a problem, do:
sudo apt --fix-broken install
sudo apt-get upgrade
If there is still a problem, remove and recreate your venv. And Reinstall your requirements:
rm -rf venv
python3.9 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
Solution 4:
Try to:
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
python get-pip.py
Solution 5:
I encountered the same error on Ubuntu 20.04 when using python3.9
, I tried to run sudo apt update && sudo apt upgrade
.
The output advised me to run sudo apt --fix-broken install
, which had solved my problem and python3.9
is running fine now.