+1 vote
in Programming Languages by (6.7k 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

0 votes
by (12.7k points)

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

...