갈루아의 반서재

728x90

아나콘다가 설치되어 있음에도 불구하고 conda: command not found 라는 메시지가 나오는 경우 다음과 같이 처리한다.


for anaconda 2 :

export PATH=~/anaconda2/bin:$PATH

for anaconda 3 :

export PATH=~/anaconda3/bin:$PATH


founder@merrow:~$ conda create --name pyenv python=2

conda: command not found

founder@merrow:~$ export PATH=~/anaconda3/bin:$PATH

founder@merrow:~$ conda create --name pyenv python=2

Solving environment: done


==> WARNING: A newer version of conda exists. <==

  current version: 4.5.12

  latest version: 4.6.7


Please update conda by running

    $ conda update -n base -c defaults conda


## Package Plan ##

  environment location: /home/founder/anaconda3/envs/pyenv

  added / updated specs:

    - python=2


The following packages will be downloaded:

    package                    |            build

    ---------------------------|-----------------

    libedit-3.1.20181209       |       hc058e9b_0         188 KB

    certifi-2018.11.29         |           py27_0         146 KB

    ca-certificates-2019.1.23  |                0         126 KB

    pip-19.0.3                 |           py27_0         1.8 MB

    wheel-0.33.1               |           py27_0          39 KB

    openssl-1.1.1b             |       h7b6447c_1         4.0 MB

    setuptools-40.8.0          |           py27_0         635 KB

    python-2.7.15              |       h9bab390_6        12.8 MB

    ------------------------------------------------------------

                                           Total:        19.7 MB


The following NEW packages will be INSTALLED:

    ca-certificates: 2019.1.23-0

    certifi:         2018.11.29-py27_0

    libedit:         3.1.20181209-hc058e9b_0

    libffi:          3.2.1-hd88cf55_4

    libgcc-ng:       8.2.0-hdf63c60_1

    libstdcxx-ng:    8.2.0-hdf63c60_1

    ncurses:         6.1-he6710b0_1

    openssl:         1.1.1b-h7b6447c_1

    pip:             19.0.3-py27_0

    python:          2.7.15-h9bab390_6

    readline:        7.0-h7b6447c_5

    setuptools:      40.8.0-py27_0

    sqlite:          3.26.0-h7b6447c_0

    tk:              8.6.8-hbc83047_0

    wheel:           0.33.1-py27_0

    zlib:            1.2.11-h7b6447c_3


Proceed ([y]/n)? y

Downloading and Extracting Packages

libedit-3.1.20181209 | 188 KB    | ####################################################################################################################################### | 100%

certifi-2018.11.29   | 146 KB    | ####################################################################################################################################### | 100%

ca-certificates-2019 | 126 KB    | ####################################################################################################################################### | 100%

pip-19.0.3           | 1.8 MB    | ####################################################################################################################################### | 100%

wheel-0.33.1         | 39 KB     | ####################################################################################################################################### | 100%

openssl-1.1.1b       | 4.0 MB    | ####################################################################################################################################### | 100%

setuptools-40.8.0    | 635 KB    | ####################################################################################################################################### | 100%

python-2.7.15        | 12.8 MB   | ####################################################################################################################################### | 100%


Preparing transaction: done

Verifying transaction: done

Executing transaction: done

#

# To activate this environment, use:

# > source activate pyenv

#

# To deactivate an active environment, use:

# > source deactivate

#

위의 경로를 다음과 같이 bashrc 파일에 붙여넣은 다음 저장한다. 

(pyenv) founder@merrow:~/pyenv$ sudo nano ~/.bashrc

그리고 source .bashrc 를 통해 변경사항을 반영한 후, 다시 아나콘다를 활성화시킨다.

(pyenv) founder@merrow:~/pyenv$ source ~/.bashrc
founder@merrow:~/pyenv$ source activate pyenv
founder@merrow:~$ source activate pyenv
(pyenv) founder@merrow:~$


참고 https://stackoverflow.com/questions/18675907/how-to-run-conda

728x90