アンドロイド

Debian 10にanacondaをインストールする方法

Let's Play - FTL: Advanced Edition! [Episode 4]

Let's Play - FTL: Advanced Edition! [Episode 4]

目次:

Anonim

Anacondaは、最も人気のあるPython / Rデータサイエンスおよび機械学習プラットフォームです。 大規模なデータ処理、予測分析、科学計算に使用されます。

Anacondaディストリビューションには、1, 500を超えるオープンソースデータパッケージが付属しています。 また、condaコマンドラインツールと、Anaconda Navigatorと呼ばれるデスクトップグラフィカルユーザーインターフェイスも含まれています。

このチュートリアルでは、Debian 10にAnaconda Python Distributionをダウンロードしてインストールする手順を説明します。

Anacondaのインストール

この記事の執筆時点では、Anacondaの最新の安定バージョンはバージョン2019.10です。 Anacondaインストーラースクリプトをダウンロードする前に、Anacondaのダウンロードページにアクセスして、ダウンロード可能なPython 3用のAnacondaの新しいバージョンがあるかどうかを確認してください。

スクリプトを実行して、Anacondaのインストールプロセスを開始します。

sh /tmp/Anaconda3-2019.10-Linux-x86_64.sh

Welcome to Anaconda3 2019.10 In order to continue the installation process, please review the license agreement. Please, press ENTER to continue >>>

ENTER を押して続行し、 ENTER を押してライセンスをスクロールします。 ライセンスの確認が完了すると、ライセンス条項に同意するよう求められます。

Do you accept the license terms? >>> yes

yes と入力してライセンスに同意すると、スクリプトはインストール場所を選択するように求めます。

Anaconda3 will now be installed into this location: /home/vagrant/anaconda3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below

デフォルトの場所は、ほとんどのユーザーに適しています。 ENTER を押して場所を確認すると、インストールプロセスが開始されます。

インストールには時間がかかる場合があります。 完了すると、次のように表示されます。

Preparing transaction: done Executing transaction: done installation finished. Do you wish the installer to initialize Anaconda3 by running conda init?

yes と入力して ENTER を押すと、スクリプトにより conda PATH 追加 conda れます。

==> For changes to take effect, close and re-open your current shell. <== If you'd prefer that conda's base environment not be activated on startup, set the auto_activate_base parameter to false: conda config --set auto_activate_base false Thank you for installing Anaconda3! =========================================================================== Anaconda and JetBrains are working together to bring you Anaconda-powered environments tightly integrated in the PyCharm IDE. PyCharm for Anaconda is available at:

Anacondaインストールをアクティブにするには、Anacondaインストーラーによって次のコマンドを使用して現在のシェルセッションに追加された新しい PATH 環境変数をロードします。

source ~/.bashrc

Anacondaが正常にインストールされたことを確認するには、 conda コマンドを使用し conda

conda info

active environment: base active env location: /home/vagrant/anaconda3 shell level: 1 user config file: /home/vagrant/.condarc populated config files: conda version: 4.7.12 conda-build version: 3.18.9 python version: 3.7.4.final.0 virtual packages: base environment: /home/vagrant/anaconda3 (writable) channel URLs: https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache: /home/vagrant/anaconda3/pkgs /home/vagrant/.conda/pkgs envs directories: /home/vagrant/anaconda3/envs /home/vagrant/.conda/envs platform: linux-64 user-agent: conda/4.7.12 requests/2.22.0 CPython/3.7.4 Linux/4.19.0-5-amd64 debian/10 glibc/2.28 UID:GID: 1000:1000 netrc file: None offline mode: False

Anacondaの更新

Anacondaの更新は非常に簡単なプロセスです。 conda 使用して conda ツールを更新することから conda ます。

conda update conda

更新の確認を求められたら、 y を入力して続行します。

conda が更新されたら、Anacondaの更新を続行します。

conda update anaconda

前と同じように、プロンプトが出されたら y と入力して続行します。

Anacondaインストールを定期的に更新する必要があります。

Anacondaのアンインストール

DebianシステムからAnacondaをアンインストールするには、最初にAnacondaをインストールしたディレクトリを削除します。

rm -rf ~/anaconda3

~/.bashrc ファイルを編集し、PATH環境変数からAnacondaディレクトリを削除します。

〜/.bashrc

# >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/home/vagrant/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if; then eval "$__conda_setup" else if; then. "/home/vagrant/anaconda3/etc/profile.d/conda.sh" else export PATH="/home/vagrant/anaconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<<

次の rm コマンドを実行して、ユーザーのホームディレクトリから非表示のファイルとフォルダーを削除します。

rm -rf ~/.condarc ~/.conda ~/.continuum `` `

結論

DebianシステムにAnacondaをダウンロードしてインストールしたので、公式の「Conda入門ガイド」を確認できます。

デビアンアナコンダ