티스토리 뷰
노트북 셋팅을 하면서 zsh을 다시 설치하고, anaconda를 설치하였다.
그런데 갑자가 prompt에 anaconda환경 상태가 사라졌다.
해결방법
사실 이것은 anaconda 명령어 도움말만 확인하면 알 수 있다.
- 문제의 prompt
akami@akamiui-MacBookPro %
- 해결된 prompt
(base) akami@akamiui-MacBookPro %
- 해결 방법 : 아래와 같이 init 명령어는 shell이 변경되면 초기화 해줘야 하는 옵션
(base) akami@akamiui-MacBookPro % conda ~
usage: conda [-h] [-V] command ...
conda is a tool for managing and deploying applications, environments and packages.
Options:
positional arguments:
command
clean Remove unused packages and caches.
compare Compare packages between conda environments.
config Modify configuration values in .condarc. This is modeled after the git config command. Writes to
the user .condarc file (/Users/akami/.condarc) by default.
create Create a new conda environment from a list of specified packages.
help Displays a list of available conda commands and their help strings.
info Display information about current conda install.
init Initialize conda for shell interaction. [Experimental]
- 실제로 ~/.zshrc 에는 아래의 스크립트가 추가된다.
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/akami/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/akami/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/akami/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/akami/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Selenium
- conda init
- pip freeze #패쇄망 #wheel
- jupyter lab
- __code__
- Lodash
- pyenv
- anaconda env
- 동적클래스생성
- backup
- HashMap.getOrDefault
- Restore
- gitlab
- jqzip
- MAC
- covid19
- selenium #chromedriver
- redmine plugin
- vscode
- sorted
- bootrap
- python의 Reflection
- zsh
- 호스트와 시간맞추기
- importlib
- jqgrid
- inspect.py
- docker
- elasticsearch
- virturalenv
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함