Python 3.8 User Account Cannot Pip Install Anything
Summary
Directly running pip install
and pip install --user
both result in an error.
Steps to reproduce
docker run --rm -it registry1.dso.mil/ironbank/opensource/python:v3.8 /bin/bash
pip install coverage
pip install --user coverage
What is the current bug behavior?
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/home/python/.cache/pip/wheels/87/d7/77/e506cf805ebdf7fb7bd92fab4a30d43ccd867c904a80eb1e19'
Consider using the `--user` option or check the permissions.
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/home/python/.cache/pip/wheels/87/d7/77/e506cf805ebdf7fb7bd92fab4a30d43ccd867c904a80eb1e19'
Check the permissions.
What is the expected correct behavior?
The 'coverage' (or any chosen package) is installed.
Relevant logs and/or screenshots
WARNING: The directory '/home/python/.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/python/.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.
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/home/python/.cache/pip/wheels/87/d7/77/e506cf805ebdf7fb7bd92fab4a30d43ccd867c904a80eb1e19'
Consider using the `--user` option or check the permissions.
WARNING: The directory '/home/python/.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/python/.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.
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/home/python/.cache/pip/wheels/87/d7/77/e506cf805ebdf7fb7bd92fab4a30d43ccd867c904a80eb1e19'
Check the permissions.
Possible fixes
Relating to #146 (closed), it may be that the user directory needs initialized with the correct permissions in order to be used.
Tasks
-
Bug has been identified and corrected within the container
Please read the Iron Bank Documentation for more info