I don't know what's the deal but I am stuck following some stackoverflow solutions which gets nowhere. Can you please help me on this?
Monas-MacBook-Pro:CS764 mona$ sudo python get-pip.py
The directory '/Users/mona/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/mona/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
/tmp/tmpbSjX8k/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
Collecting pip
Downloading pip-7.1.0-py2.py3-none-any.whl (1.1MB)
100% |████████████████████████████████| 1.1MB 181kB/s
Installing collected packages: pip
Found existing installation: pip 1.4.1
Uninstalling pip-1.4.1:
Successfully uninstalled pip-1.4.1
Successfully installed pip-7.1.0
Monas-MacBook-Pro:CS764 mona$ pip --version
-bash: /usr/local/bin/pip: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory
I got same problem. If I run
brew link --overwrite python2
. There was stillzsh: /usr/local/bin//fab: bad interpreter: /usr/local/opt/python/bin/python2.7: no such file or directory
.Solved it! Now we can use python2 version fabric.
=== 2018/07/25 updated
There is convinient way to use python2 version fab when your os python linked to python3.
.sh
for your command.Hope this helps.
this command worked out for me
In my case, I decided to remove the homebrew python installation from my mac as I already had two other versions of python installed on my mac through MacPorts. This caused the error message.
Reinstalling python through brew solved my issue.
Because I had both python 2 and 3 installed on Mac OSX I was having all sorts of errors.
I used which to find the location of my python2.7 file (/usr/local/bin/python2.7)
Then I symlinked my real python2.7 install location with the one the script expected:
Yes. it seems it is a quite frequent problem. One solution is install Anaconda3, download
Anaconda3-4.2.0-Linux-x86_64.sh
and Anaconda3 will provide you python and pip at the same time and they are coordinated.I made the same error using sudo for my installation. (oops)
This brought everything back to normal.