18.04.2 pip install script as sudo was executed per instructions:
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
rm get-pip.py
and an error (in bold below) was observed however the final pip --version
seems to work correctly.
Is there any reason to be concerned regarding the error? If so, what corrective action is needed?
user@nanite:/$ sudo python3 get-pip.py 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. Collecting pip Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB) |████████████████████████████████| 1.4MB 368kB/s Collecting setuptools Downloading https://files.pythonhosted.org/packages/ec/51/f45cea425fd5cb0b0380f5b0f048ebc1da5b417e48d304838c02d6288a1e/setuptools-41.0.1-py2.py3-none-any.whl (575kB) |████████████████████████████████| 583kB 11.3MB/s Collecting wheel Downloading https://files.pythonhosted.org/packages/bb/10/44230dd6bf3563b8f227dbf344c908d412ad2ff48066476672f3a72e174e/wheel-0.33.4-py2.py3-none-any.whl
ERROR: launchpadlib 1.10.6 requires test resources, which is not installed.
Installing collected packages: pip, setuptools, wheel Successfully installed pip-19.1.1 setuptools-41.0.1 wheel-0.33.4 user@nanite:/$ pip --version pip 19.1.1 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
You are installing
pip
withsudo
but its using your user's home folder's python staging area. This can cause issues later on where paths added by thesudo
'd process are not writable by non-sudo
'd processes.sudo -H ...
will avoid those errors.Would it not be preferable to install
pip3
viaapt
?This way any dependencies are met in accordance with the 18.04.2 LTS release.