아주 가끔 conda
를 설치를 했지만 PATH
등에 conda의 실행파일들의 경로가 안 잡혀서
conda activate
등이 전혀 동작하지 않는 경우가 있음.
주로 shell 을 바꾼 경우나 설치 중 초기화 부분에 문제가 있을 때 발생하는 문제로
conda init <현재_shell>
을 통해 .bashrc
나 .zshrc
등의 설정을 수정하면된다.
bash 기준
conda init bash
source .bashrc 수행.
zsh 기준
conda init zsh
source .zshrc
확인하기
각 shell의 설정파일에 다음의 블럭이 마지막에 추가되었다면 이후 제대로 수행될 것임.
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
...
관련 설정 처리
...
# <<< conda initialize <<<
관련하여 읽어보면 좋은 자료들
2023.06.29 - [개발환경] - [CLI] Power Shell의 Profile 수정 : conda를 위해서
[CLI] Power Shell의 Profile 수정 : conda를 위해서
Power Shell의 profile 경로에 한글이 있는 경우, conda등의 activate가 제대로 안되는 경우가 있다. 이 경우가 발생하는 대부분의 이유는 사용자 이름 등을 한글로 한 경우나... onederive를 한글 윈도우에서
ds31x.tistory.com
powershell conda 설정하기
안녕하세요. 다들 python 사용할 때 conda 많이 사용하시나요? 패키지 관리(pip)가 편해서 주로 사용하고 ...
blog.naver.com
https://dsaint31.tistory.com/238
sh파일에서 conda 가상환경 activation!
ubuntu에서 셀스크립트를 작성하던 중, conda activate 가 동작하지 않던 문제가 발생. 가상환경 이름이 test라고 한다면, 다음과 같이 처리해야 함. #!/bin/bash source ~/miniconda3/etc/profile.d/conda.sh conda activate
dsaint31.tistory.com
'개발환경' 카테고리의 다른 글
[vscode] external terminal 사용하기 (0) | 2023.12.15 |
---|---|
[CE] shortcuts (or hot-keys, 단축키) : Basic (0) | 2023.12.15 |
[zsh] zsh-autosuggestions (1) | 2023.09.08 |
[zsh] zsh-syntax-highlighting 설치. (0) | 2023.09.08 |
[zsh] .profile의 설정을 .zprofile로 ... (0) | 2023.09.08 |