When conda install django, PermissionError(13, 'Permission denied')

拥有回忆 提交于 2021-02-07 02:05:21

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!