Recently I messed up my steady environment by installing multiple versions of python.
What I'm trying to do: install a particular package using pip
pip cannot install any package without the --user tag
Could not install packages due to an EnvironmentError: [Errno 13 Permission denied: '/Library/Python/2.7/site-packages/PIL
Here's More information:
which pip
/usr/local/bin/pip
which python
/usr/bin/python
What should I do?
Use sudo or su to install packages system-wide.
Related
Setup:
PC Windows 10 -- Have administrator rights
Python version 3.10.8
pip version 22.3
cmd used:
pip install pygal_maps_world
I am trying to pip install pygal_maps_world (have tried multiple variations of pip install) and constantly get:
ERROR: Error [WinError 5] Access is denied while executing command python setup.py egg_info
and
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied
Check the permissions
I can install other packages using pip, just not this particular package.
Any suggestions on how to get around this error?
Attempted: I have tried multiple variations of pip install following suggestions on here and other sites, and this is the only package I have not been able to install using pip. As I need it to complete some work, I need to install it.
Expected: pip install should install this like any other package
I want to install pip3 install twint but I get the error:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/3.8'
Consider using the `--user` option or check the permissions.
what command do i need to type to install it under my user option?
would it be python -m pip3 install twint?
as suggested by pip, use --user: python3 -m pip install --user twint
it will install your package in your home (https://pip.pypa.io/en/stable/user_guide/#user-installs)
as a better alternative, you can look into virtual environments
Try installing this using the Anaconda Navigator cmd. The installation did not work in Jupyter Notebook, but it did work in Anaconda Navigator cmd.
After installing python 3.8, I cannot install module with pip:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/.local/lib/python3.8/site-packages/enum34-1.1.10.dist-info'
Check the permissions.
Try to use sudo in the beginning of the command if you are in linux. Maybe you are bot using the system as a root
Add --user at the end
pip3 install package_name --user
I would try to use anaconda with the following command in the terminal:
conda install -c anaconda pip
If you don't have anaconda:
pip install conda
When I try to install libmagic using pip install python-libmagic, I get the following error:
Could not install packages due to an EnvironmentError: [Error 13] Permission denied: 'c:\users\*****\anaconda\Lib\site-pakages\_cffi_backend.cp36-win_amd64.pyd'
Consider using the --user option or check the permissions.
What should I do to rectify this error?
You are trying to install the package to a system folder which you don't have permissions to write to.
You have two options(use only one of them):
1-setup a virtual env to install the package (recommended):
python3 -m venv env
source ./env/bin/activate
python -m pip install python-libmagic[samples]
2. install the package to the user folder:
python -m pip install --user python-libmagic[samples]
After successfully installling virtualenv in terminal with 'pip install virtualenv', I tried installing virtualwrapper with 'pip install virtualenvwrapper' and something seems to have gone wrong with some code presenting in red instead of the usual white. There was about 20-30 lines of code in essence it said the following:
Installing collected packages: virtualenv-clone, pbr, stevedore, virtualenvwrapper
Exception:
Traceback (most recent call last):
Then there is a list of file paths shown, followed by..
IOError: [Errno 13] Permission denied:
'/usr/local/lib/python2.7/dist-packages/clonevirtualenv.py'
Does anyone know what could have gone wrong and how I can fix it?
Thanks
when it's about permission problem you have try with sudo(super user).
if Linux,
$ sudo pip install virtualenvwrapper
if Windows,
open cmd with administration privilege and then,
pip install virtualenvwrapper
First, uninstall virtualenv
# you might need to use sudo depending on how you installed it
pip uninstall virtualenv
Then, install virtualenvwrapper with sudo
sudo pip install virtualenwrapper
Since virtualenvwrapper has virtualenv among its dependencies, it will take care of installing it - no need to do it manually.
You should install virtualenvwrapper via system package manager.
Either dnf install python-virtualenvwrapper on Fedora or apt-get install virtualenvwrapper on Debian/Ubuntu.