ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/Users/user/Library/Python/3.8/lib'
Check the permissions.
I use pip3 install --user --upgrade tensorflow.
Why Is't work... Somebody help me pls..
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/Users/user/Library/Python/3.8/lib'
Check the permissions.
I use pip3 install --user --upgrade tensorflow.
Why Is't work... Somebody help me pls..
I probably meet the same problem.
pip3 install lxml
Result:
Defaulting to user installation because normal site-packages is not writeable
Collecting lxml
Using cached lxml-4.6.3-cp38-cp38-macosx_10_9_x86_64.whl (4.6 MB)
Installing collected packages: lxml
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/Users/username/Library/Python/3.8'
Check the permissions.
Mostly of answers tell us to add --user
pip3 install lxml --user
Result:
Collecting lxml
Using cached lxml-4.6.3-cp38-cp38-macosx_10_9_x86_64.whl (4.6 MB)
Installing collected packages: lxml
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/Users/username/Library/Python/3.8'
Check the permissions.
I don't want to use sudo to install package
sudo pip3 install lxml
I can't install then use virtualenv
virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
I found only Python on path '/Users/username/Library/' be owned by root,
...
drwxr-xr-x 5 username staff 160 6 29 2015 PubSub
drwx------ 3 root staff 96 3 6 2019 Python
drwxr-xr-x@ 4 username staff 128 10 21 2020 Reminders
drwxr-xr-x 37 username staff 1184 8 19 23:03 Safari
drwxr-xr-x@ 2 username staff 64 3 12 2018 SafariSafeBrowsing
...
I decided to use chown, problem solved.
sudo chown -R $USER /Users/username/Library/Python
I had no idea what time dose Python folder be owned by root.