【发布时间】:2020-05-10 05:51:49
【问题描述】:
我最近安装了anaconda,现在在这个新的anaconda python 环境中安装新模块后,我再也找不到它们了。
这是我在输入“which python”时得到的 anaconda 环境的 python interpreter 的位置:/Users/user/opt/anaconda3/bin/python
这是我的$PATH:
/Users/user/opt/anaconda3/bin:/Users/user/opt/anaconda3/condabin:/Users/user/go/bin:/usr/local/go/bin:/Users/user/.pyenv/shims:/Users/user/.pyenv/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/local:/usr/bin:/bin:/usr/sbin:/sbin:/go/src/github.com:/Library/Frameworks/Mono.framework/Versions/Current/Commands:没有这样的文件或目录
谁能告诉我为什么anaconda 在配置了自己的路径后,在anaconda 环境中找不到我pip install 的模块?指的是这些:$PATH 中的/Users/user/opt/anaconda3/bin:/Users/user/opt/anaconda3/condabin,安装时自动附带。
我的 bash 个人资料:
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/SirFalk/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/SirFalk/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/SirFalk/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/SirFalk/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
【问题讨论】: