当conda install Django时,PermissionError(13,“Permission denied”)

2024-09-22 16:41:52 发布

您现在位置:Python中文网/ 问答频道 /正文

当我运行conda install django时,得到以下错误:

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')

我该怎么办?


Tags: installdjangoenvironmentversion错误backupdateconda
3条回答

我想补充一点,windows命令提示符也是如此。您必须以管理员身份运行Anaconda提示符。

权限被拒绝。。这可能是因为您没有以根用户身份运行命令。尝试以超级管理员的身份运行您的命令

我解决了:

sudo chown -R user anaconda3

我用this issue作为参考。

相关问题 更多 >