The reason why you are getting import errors while trying to install any package using pip is that you must have upgraded your system accidentally.
To overcome this error you would not want to upgrade your system and instead use a virtualenv.
And if you want to use pip so you need to recover the pip3 for that you can use
sudo python3 -m pip uninstall pip
After you uninstall the pip then reinstall it by the below-mentioned command:-
sudo apt install python3-pip --reinstall.
If You want to learn python for data science visit this python course by Intellipaat.