在我的Conda env中使用pip3安装新软件包后,我无法将它们导入到jupyter中。
(base) MacBook-Air:~ johnsmith$ which python
/usr/bin/python
看看其他帖子,我知道这意味着我的默认python不是condo python安装,因此我没有将软件包安装到正确的位置。在查看其他帖子时,我认为我可能需要修复.bash_profile文件以将pip3指向正确的python版本。不幸的是,该文件在几次conda初始化后看起来很混乱。也许这些是以前的公寓安装中的剩余物。如何修复此bash文件? (我更改了用户名,但其他文件相同)。
export LD_LIBRARY_PATH=/Users/johnsmith/homework/mjpro131/bin
export PATH="$LD_LIBRARY_PATH:$PATH"
# added by Anaconda3 2019.10 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/opt/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
# . "/opt/anaconda3/etc/profile.d/conda.sh" # commented out by conda initialize
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/johnsmith/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/johnsmith/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/johnsmith/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/johnsmith/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<