当我尝试安装任何库(例如 pandas)时,甚至当我尝试使用 . 安装干净的包时,conda install anaconda-clean
它会出现错误:
Collecting package metadata (current_repodata.json): failed
NotWritableError: The current user does not have write permissions to a required path.
path: /home/parth/.conda/pkgs/urls.txt
uid: 1000
gid: 1000
If you feel that permissions on this path are set incorrectly, you can manually
change them by executing
$ sudo chown 1000:1000 /home/parth/.conda/pkgs/urls.txt
In general, it's not advisable to use 'sudo conda'.
答案1
由于您没有权限,我也收到此错误。康达命令无法与 sudo 一起使用。为了修复此错误,我通过更改所有权授予了 anaconda 文件夹权限。
$ sudo chown -R myuser /home/myuser/anaconda3