For completeness, I simply encountered this trouble with "Ubuntu latest" ... v18.04 ... and glued it on this way:
python3 -m pip set up --improve pip
(Notice that it become vital to specify
python3 considering the fact that this references Python 3.6.9. The
python command at the identical gadget references Python 2.7.17. Since that is seemingly a gadget-extensive set up it encountered a ["not sudo" ...] permission error, however it failed to count as it become the incorrect issue to do anyway. I become encountering the trouble with
Are you the usage of python2 or python3 then The following instructions can be different!
python3 -m pip --version to peer when you have pip installed.
- if yes, run
python3 -m pip set up --improve pip.
- if no, run
sudo apt-get set up python3-pip, and do it again.I've visible this trouble when
PYTHONPATH become set to consist of the built-in
site-packages directory. Since Python appears there routinely it's miles needless and may be removed.
I simply encountered the identical trouble and in my case, it seems that is a war among the python set up in my virtualenv and the site-extensive python (Ubuntu). What solves it for me is to run pip on this way, to pressure utilization of the perfect python set up (in my vortualenv):
python3 -m pip set up PACKAGE
pip3 set up PACKAGE
I realised this once I attempted to observe a number of the solutions right here that advise re-putting in pip and the mistake output I were given become pointing to an present site-extensive python library route even though I had activated my virtualenv. Worth attempting earlier than deleting and re-putting in stuff.