ubuntu conda 更新、下载模块包权限问题 'Permission denied'

转自http://blog.csdn.net/m0_37733057 http://blog.csdn.net/m0_37733057/article/details/77679714

用conda安装pytorch的时候,老是出现问题,后面使用conda安装其他软件时,提示conda需要更新,但是更新时,数据包能够下载下来,安装时就出现下类问题:

Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(481): An error occurred while uninstalling package 'defaults::setuptools-38.4.0-py36_0'.
PermissionError(13, 'Permission denied')
Attempting to roll back.

Rolling back transaction: done

PermissionError(13, 'Permission denied')

试很多方法之后,发现另一个博主的方法很有效,在这里推荐给大家:

jiangmignzhi@jiangmignzhi-X555LB:~$ sudo chown -R marley:marley /home/marley/anaconda3 
marley是自己的用户名,输入之后,敲击回车,我的问题就解决了
jiangmignzhi@jiangmignzhi-X555LB:~$ conda upgrade --allSolving 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: /home/jiangmignzhi/anaconda3


The following packages will be UPDATED:

    certifi:    2018.1.18-py36_0  defaults --> 2018.1.18-py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    setuptools: 38.4.0-py36_0     defaults --> 38.4.0-py36_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge

The following packages will be DOWNGRADED:

    future:     0.16.0-py36_1     defaults --> 0.16.0-py36_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libffi:     3.2.1-hd88cf55_4  defaults --> 3.2.1-3          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    tk:         8.6.7-hc745277_3  defaults --> 8.6.7-0          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    xz:         5.2.3-h55aa19d_2  defaults --> 5.2.3-0          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    zlib:       1.2.11-ha838bed_2 defaults --> 1.2.11-0         https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge

Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

成功搞定!!!

如果在Ubuntu系统中,无法使用conda更新的话,可以尝试以下步骤来解决问题。首先,确保你已经打开了终端。然后,按照以下步骤进行操作: 1. 首先,运行以下命令来更新conda本身: ``` conda update conda ``` 2. 如果更新conda后,还是无法更新其他,可以尝试清理conda的缓存。运行以下命令来清理缓存: ``` conda clean --all ``` 3. 然后,运行以下命令来更新所有其他的: ``` conda update --all ``` 这样,你的conda和所有其他都应该会被更新到最新版本了。如果还是有问题,可以尝试重新安装conda或者检查网络连接,确保能够正常访问conda的服务器。希望这些步骤能够帮助你解决问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [Ubuntu系统中如何更新conda到最新版本 conda-env: error: invalid choice: ‘rename‘ (choose from ...](https://blog.csdn.net/qq_52813185/article/details/128968344)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [ubuntu 16.04, conda不能安装、更新的解决办法](https://blog.csdn.net/qq_39429669/article/details/120183964)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值