pip curl issue


When I run this command "curl https://bootstrap.pypa.io/get-pip.py | sudo python", I get this error "Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-9.0.1.dist-info/DESCRIPTION.rst'
Consider using the --user option or check the permissions."

I found this article https://stackoverflow.com/questions/12277716/permission-denied-error-when-trying-to-install-pip-in-mac-os-x-lion

and tried like this instead "curl https://bootstrap.pypa.io/get-pip.py | sudo python", it worked!

Installing collected packages: pip, wheel
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Successfully installed pip-10.0.1 wheel-0.31.1