Reputation:
I'm trying to install jupyter notebook in my virtual environment. I have python 3.5 running on my virtual env and the latest pip version. I'm having trouble installing almost any library using pip. It gives me the following error even when I run the following commands:
python3 -m pip install --upgrade pip
python3 -m pip install jupyter
Error:
The directory '/Users/[user]/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/[user]/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting jupyter
Could not fetch URL https://pypi.python.org/simple/jupyter/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping
Could not find a version that satisfies the requirement jupyter (from versions: )
No matching distribution found for jupyter
Upvotes: 1
Views: 853
Reputation: 638
Ah yes, the eternal problems of correctly installing Python on MacOS...
You should use brew
to install python to prevent these problems, as it will set you as the correct owner of all the directories instead of root
. This seems like a good guide: How can I use Homebrew to install both Python 2 and 3 on Mac?
Alternatively, you can run your code above with sudo
, but this is discouraged practice.
Upvotes: 1