Pip error on installing Python 3.5

Zachary Ware zachary.ware+pylist at gmail.com
Wed Oct 12 00:45:36 EDT 2016


On Tue, Oct 11, 2016 at 7:07 PM, Steve D'Aprano
<steve+python at pearwood.info> wrote:
> I've just installed Python 3.5 from the source tarball and received an
> unexpected error related to pip. On Linux, as a regular user (except for
> the last line):
>
>
> wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
> tar xvf Python-3.5.2.tgz
> cd Python-3.5.2
> ./configure
> make
> sudo make altinstall
>
>
> There were no obvious errors until the end:
>
> The directory '/home/steve/.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.
>
> Ignoring indexes: https://pypi.python.org/simple
>
> The directory '/home/steve/.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.
>
>
>
> Can anyone explain what is going on, why I should care, and how I should fix
> it?

Those aren't errors, and pip should be perfectly usable.  The message
about `/home/steve/.cache/pip` is just because pip is being run via
sudo; pip's cache dir is based on $HOME, which is still set to
`/home/steve` and pip doesn't want to screw up its cache for the
`steve` user.  The "Ignoring indexes" message is due to ensurepip
explicitly disabling pulling from PyPI when installing pip and
setuptools.

The messages about the cache do look a bit unnecessarily scary, it
might be nice if they didn't appear when pip is run by ensurepip.  I'm
not sure what removing the message for that particular case might
entail, but it might be worth opening an issue for it.

-- 
Zach



More information about the Python-list mailing list