美文网首页
学习:Mac Anaconda 卸载

学习:Mac Anaconda 卸载

作者: RachaelRiggs | 来源:发表于2020-03-10 10:05 被阅读0次
  1. 安装anaconda-clean
    conda install anaconda-clean
$ conda install anaconda-clean
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /opt/anaconda3

  added / updated specs:
    - anaconda-clean


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    conda-4.8.2                |           py37_0         2.8 MB
    ------------------------------------------------------------
                                           Total:         2.8 MB

The following NEW packages will be INSTALLED:

  anaconda-clean     pkgs/main/osx-64::anaconda-clean-1.1.0-py37_1

The following packages will be UPDATED:

  conda                                       4.7.12-py37_0 --> 4.8.2-py37_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
conda-4.8.2          | 2.8 MB    | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(base) 

  1. 删除隐藏文件和backup
anaconda-clean
Delete .anaconda? (y/n): y
Backup directory: /Users/quyue/.anaconda_backup/2020-03-10T085706
Delete .conda? (y/n): y 
Delete .idlerc? (y/n): y
Delete .ipython? (y/n): y
(base) 

删除backup

rm -rf /Users/quyue/.anaconda_backup/2020-03-10T085706

3.删除anaconda文件夹
3.1 找到anaconda文件夹
可以用command + [空格]唤出spotlight,搜索anaconda3的位置,显示在macintosh/opt/anaconda3

3.2 删除anaconda3发现权限不够

$ rm -rf ./anaconda3                     
rm: ./anaconda3: Permission denied

3.3 修改权限

chmod 777 anaconda3
(base) 
# quyue @ qy in /opt [9:48:12] 
$ ls -lh
total 0
drwxrwxrwx  2 quyue  wheel    64B  3 10 09:47 anaconda3
drwxr-xr-x  4 quyue  admin   128B 10 25 17:07 schrodinger
(base) 
# quyue @ qy in /opt [9:48:17] 
$ rm -rf anaconda3
rm: anaconda3: Permission denied

3.4 还是权限不够,直接用sudo

$ sudo rm -rf anaconda3                   
Password:
(base) 
# quyue @ qy in /opt [9:51:17] 
$ ls -lh
total 0
drwxr-xr-x  4 quyue  admin   128B

anaconda3的文件夹已经删除成功

  1. 最后vim到环境路径中删除anaconda3的路径设置
vim ~/.bash_profile

删除Python3.7设置的环境路径,如下部分:

# added by Anaconda3 5.3.0 installer
\# >>> conda init >>>
\# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/anaconda3/bin:$PATH"
    fi
fi

refhttps://docs.continuum.io/anaconda/install/uninstall/

相关文章

网友评论

      本文标题:学习:Mac Anaconda 卸载

      本文链接:https://www.haomeiwen.com/subject/qzmidhtx.html