LoginSignup
31

More than 5 years have passed since last update.

ざっくり、Anacondaアンインストール

Last updated at Posted at 2018-12-29

はじめに

Hombrew導入時にAnacondaの影響によるWaringが出て躓きました。
結局、Anacondaが原因と判明。これをアンインストールすることになったので、その手順を簡単にまとてみました。

環境

Mac OS Mojave Version 10.14

Anaconda アンインストール手順

大きく4つのステップです。

1. anaconda-cleanをインストール
2. anaconda-cleanを起動
3. Homeフォルダ内のAnacondaファイル削除
4. PATHの削除

1. anaconda-cleanをインストール

$ conda install anaconda-clean

 environment location: /root/anaconda3

  added / updated specs: 
    - anaconda-clean


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    anaconda-clean-1.1.0       |           py36_0           5 KB
    conda-4.5.8                |           py36_0         1.0 MB
    ------------------------------------------------------------
                                           Total:         1.0 MB

The following NEW packages will be INSTALLED:

    anaconda-clean: 1.1.0-py36_0

The following packages will be UPDATED:

    conda:          4.5.4-py36_0 --> 4.5.8-py36_0

Proceed ([y]/n)? y # yを入力

最後にyes/no聞かれるので、yesと回答してインストールします。

2. anaconda-cleanを起動

$ anaconda-clean

Delete .conda? (y/n): y # yを入力
Backup directory: /root/.anaconda_backup/2018-07-13T095546
Delete .ipython? (y/n): y # yを入力
Delete .jupyter? (y/n): y # yを入力
Delete .theano? (y/n): y # yを入力

全てyesと回答して実行。

以上で、Anacondaの不要になったファイルが削除されクリーンな状態になります。
ターミナルでの作業は以上です。

3. Homeフォルダ内のAnacondaファイル削除

pythonを起動すると、まだAnacondaがあるので、homeフォルダからAnacondaフォルダを削除します。

$ python

Python 3.6.0 |Anaconda custom (x86_64)| (default, Dec 23 2016, 13:19:00)

4. PATHの削除

bash_profileを起動します。
bash_profileは、平たく言うと、開発環境や起動プログラムの設定を記述する為のファイルです。

$ open ~/.bash_profile

以下の様な記述のAnacondaパスを削除します。

# added by Anaconda3 4.3.1 installer
export PATH="/Users/hideki/anaconda/bin:$PATH"

最後に

Pythonを起動してMac OS標準のPython2系が起動すればOKです。
つまり、Anacondaは起動していないことになります。

$ python

Python 2.7.10 (default, Aug 17 2018, 17:41:52) 

以上で完了です。お疲れ様でした。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
31