有没有办法在Jupyter Notebook中使用pipenv? [英] Is there a way to use pipenv with Jupyter notebook?

查看:253
本文介绍了有没有办法在Jupyter Notebook中使用pipenv?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在Jupyter笔记本上使用pipenv?

Is there a way to use pipenv with Jupyter notebook?

或更具体地说,是使用原子nteract/hydrogen python 3内核?

Or more specifically, with an atom nteract/hydrogen python 3 kernel?

推荐答案

只需成功尝试以下操作即可.

Just tried the following with success.

在您的项目文件夹中:

pipenv install ipykernel
pipenv shell

这将在您的virtualenv中打开一个终端,如下所示:

This will bring up a terminal in your virtualenv like this:

(my-virtualenv-name) bash-4.4$

在该外壳中执行:

python -m ipykernel install --user --name=my-virtualenv-name

启动jupyter笔记本:

Launch jupyter notebook:

jupyter notebook

在笔记本中,内核->更改内核.现在应该可以选择内核了.

In your notebook, Kernel -> Change Kernel. Your kernel should now be an option.

来源: IPythonNotebookVirtualenvs

这篇关于有没有办法在Jupyter Notebook中使用pipenv?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆