+2 votes
in Programming Languages by (77.8k points)

When I try to upgrade Numpy using 'sudo pip3 install --upgrade numpy', I get the following warning messages:

WARNING: The directory '/home/user/.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.

WARNING: The directory '/home/user/.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.

1 Answer

+1 vote
by (355k points)
selected by
 
Best answer

This is just a warning message and the problem is obvious from it. If you do not want this warning messge, modify your command as follows:

sudo -H pip3 install --upgrade numpy


...