问题
When I run conda install django
, I get the following error:
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.4.10
latest version: 4.4.11
Please update conda by running
$ conda update -n base conda
## Package Plan ##
environment location: /opt/anaconda/anaconda3
added / updated specs: - django
The following NEW packages will be INSTALLED:
django: 2.0.2-py36hd476221_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(481): An error occurred while installing package 'defaults::django-2.0.2-py36hd476221_0'. PermissionError(13, 'Permission denied') Attempting to roll back.
Rolling back transaction: done
PermissionError(13, 'Permission denied')
What should I do?
回答1:
I solved with:
sudo chown -R user anaconda3
I used this issue as reference.
回答2:
I would like to add that the same goes for windows command prompt. You must run the Anaconda prompt as Admin.
回答3:
Permission Denied.. That's likely because you are not running your command as root. Try and run your command as superAdmin
回答4:
I fixed.
I changed the permission of /opt/anaconda/anaconda3 recursively.
回答5:
This solved my problem. For Windows: Try deleting the pip folders in AppData/Temp. Python is unable to delete these folders and create new pip folders for unpacking the new installations.
来源:https://stackoverflow.com/questions/49092807/when-conda-install-django-permissionerror13-permission-denied