在IPython交互式shell中使用conda环境



我正在尝试在我的conda env中使用IPython的交互式shell,但遇到了问题。我采取的步骤是:

source activate myenv
conda install ipython
ipython

当我在ipython交互式shell中时,它从anaconda根箱调用python。( ~/anaconda2/bin' (

我能做些什么来更改 python 路径以~/anaconda2/envs/myenv/bin并从 myenv 导入包?

当我搜索网络时,我看到很少有使 env 在 jupyter 中工作的解决方案,但没有关于让它在交互式 shell 上运行的答案。

这可能是由于您的$PATH变量被搞砸了。

确保您从环境中获得 IPython 的最简单方法是使用$ python -m IPython <rest of the options>来启动 IPython。这适用于许多 Python 可安装应用程序;像pytest,pip和其他。

最新更新