When I use pip it usually doesn\'t work without sudo. I often see people use pip without sudo, so what am I doing wrong?
I read that it is not recommended to install
The reason is that your regular user doesn't have the permissions needed to modify the system directories. Just like in this message:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.4/dist-packages/pip'
Here is a brief rundown of what you need to know:
Your system has python installed, in order to modify the system's python you have to use sudo or be the root user.
You can install python libraries in your home directory without using sudo, but only you (not other users of the system) will be able to use it. Do this with pip install --user package-name
like gongzhitaao mentioned.
You can also create unique installations of python in a directory of your choosing, like The Laughing Man mentioned. This is called virtualenv, and I think this is the most-preferred way to work.