I'm currently stuck on exercise 46 in Zed Shaw's "Learn Python the Hardway". He says I need to install the following python packages:
He doesn't give the reader any directions on how to properly install the packages and use them. I went to the pip website but the directions were also very vague and kind of unhelpful for a newbie. The installation guide found on https://pip.pypa.io/en/latest/installing.html says to download the get-pip.py
file and then run it by typing python get-pip.py
in what I presume to be terminal.
When I do that it starts downloading, then says cleaning up..
and then a red error message appears that says:
Exception:
Traceback (most recent call last):"
followed by a bunch of file names before ending with
"OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip
Does anyone know how to correct this? If it helps, the get-pip.py
file is in my downloads folder, so I did cd Downloads
before running python get-pip.py"
You can do:
or install it with homebrew: http://mxcl.github.io/homebrew/
and then:
The error-message is IMHO pretty clear - you are not allowed to write into the given directory.
The reason for this is that you use the system-provided Python 2.7. While installing pip shouldn't break it, I personally would rather download a Python 2.7 installer, install it, and then do
This should install pip into this python, and place the pip-executable at the same location as just given
If you insist on using the system python, make it "sudo python get-pip.py". But I wouldn't mess with my system python unless forced to.