【轉】安裝、更新anaconda、更新失敗,出現“拒絕訪問”

anaconda官網下載安裝:https://www.continuum.io/downloads/

anaconda用法:
查看已經安裝的包:
pip list 或者 conda list

安裝和更新:
pip install requests
pip install requests --upgrade
或者
conda install requests
conda update requests

更新所有庫
conda update --all

更新 conda 自身
conda update conda

更新 anaconda 自身
conda update anaconda

anaconda換源:
制定清華的源:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
有資源顯示源地址:
conda config --set show_channel_urls yes

Linux和Mac下生成的配置文件路徑:~/.condarc


如果電腦中同時有anaconda2和anaconda3



anaconda3中的python執行程序改爲python3(忘了安裝好就是python3還是需要改),pip改成pip3,conda改爲conda3再將bin添加到path路徑中
更新時可以用conda3 update anaconda 和 conda update anaconda 區別2和3,也可以使用conda絕對路徑更新

國內源雖然快但貌似也不是很穩定,也經常超時連不上,不過比官方源好多了

anaconda輸入更新命令:conda upgrade --all後,出現如下錯誤:

The following packages will be UPDATED:
conda: 4.5.4-py36_0 --> 4.5.5-py36_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(502): An error occurred while uninstalling package 'defaults::conda-4.5.4-py36_0'.
PermissionError(13, '拒絕訪問。')
Attempting to roll back.

解決方法:

C:\Users\xxx> 中的xxx不是管理員,或者說就是權限不夠;
在conda在的路徑裏,......\Anaconda3右擊屬性->安全->user選中現在的用戶,修改權限至所有權限;

重新打開命令行,即可。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章