jupyter notebook与环境

2017-06-12  本文已影响0人  sherrysack

因为以前听取了网上的建议,一个项目单独使用其特有的的env, 却忘了要为每一个env都安装一次jupyter notebook, 导致装了按要求安装了package还是报错找不到对应的package,特此记录一下,如何查出jupyter notebook所运行的env:新建cell,在cell里输入并运行:

import sys
sys.path

run后得到的结果如果没有你指定的env name的话,那么jupyter notebook肯定运行在root路径下。需要重新打开command line并activate指定的env,然后再运行jupyter notebook。

在新建的env下安装jupyter notebook的方法:

source activate tensorflowproblem
conda install notebook ipykernel
ipython kernel install --user
#python -m ipykernel install --user --name other-env --display-name "Python (other-env)"
上一篇 下一篇

猜你喜欢

热点阅读