LoginSignup
32
35

More than 5 years have passed since last update.

AnacondaのPATHの設定

Last updated at Posted at 2018-06-23

はじめに

condaを使用してpythonの仮想環境を構築しようとした際に、

-bash: conda: command not found

となってしまいanacondaのパスが通っていなっかのでその解決法の基礎的なメモ

Anacondaのインストールからの解説は以下を参考


解決法

まずターミナルで以下のコマンドを実行


$ vi ~/.bash_profile

vimが開いたら

  • i (インサートモードにする)
  • 以下のパスを.bash_profileに追加
export PATH=/Users/user_name/anaconda3/bin:$PATH
  • esc(インサートモードの終了)
  • :wq(保存して終了)
  • 以下のコマンドをターミナルで実行して、追加したパスを反映させる
$ source ~/.bash_profile

ここまで終わって、pythonのパスを確認してみると

Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

無事、パスが通っていることが確認できました。

32
35
0

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
32
35