0
votes

I'm new to Ubuntu and OpenCV. I'm trying to use this tutorial to get started. However, in steps 7 and 8 I can't install pip:

wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py

What should I do? I get this error:

The directory '/home/renzo/.cache/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 '/home/renzo/.cache/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.

/tmp/tmpUEma37/pip.zip/pip/vendor/requests/packages/urllib3/util/ssl.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.

/tmp/tmpUEma37/pip.zip/pip/vendor/requests/packages/urllib3/util/ssl.py:120: 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. Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages/pip-8.1.1-py2.7.egg

1
You're probably more likely to get an answer from the Ask Ubuntu community - Luke Taylor

1 Answers

0
votes

First thing to do is get ownership of that directory. In general, all files in your home directory (/home/renzo ) should be owned by the user (renzo in your case), but to address your problem specifically, take ownership of the .cache folder:

chown -R renzo /home/renzo/.cache

You may need to prefix it with sudo, i.e.:

sudo chown -R renzo /home/renzo/.cache

The -R makes it recursive, renzo is your username, and the hidden dotfile (actually folder) is .cache

Once you've done that, try the install command again.