I am running ubuntu 16.04 and have some python code that uses features from python 3.6. I have been able to install some libraries (scipy) with python3.6 and pip3.6. However there have been a few libraries (pycurl) for which using pip install is not working :
$sudo python3.6 -m pip install pycurl
Requirement already satisfied: pycurl in /usr/lib/python3/dist-packages (7.43.0)
This does not allow me to import pycurl in my python3.6 environment. And if I instead use upgrade I get an error about pycurl being a distutils installed package.
How can I get access to pycurl for my python3.6 install?
$ sudo python3.6 -m pip install --upgrade pycurl
The directory '/home/riaps/.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/riaps/.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.
Collecting pycurl
Downloading https://files.pythonhosted.org/packages/77/d9/d272b38e6e25d2686e22f6058820298dadead69340b1c57ff84c87ef81f0/pycurl-7.43.0.1.tar.gz (195kB)
100% |████████████████████████████████| 204kB 2.8MB/s
Installing collected packages: pycurl
Found existing installation: pycurl 7.43.0
Cannot uninstall 'pycurl'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.