Jupyter Lab未使用虚拟环境 [英] Jupyter Lab is not using virtual environment

查看:231
本文介绍了Jupyter Lab未使用虚拟环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个虚拟环境,并使用pip安装了ipython[all]jupyter.当我运行jupyter lab时,打开一个笔记本,然后尝试导入在虚拟环境中安装的软件包,我会收到"ModuleNotFoundError".

I created a virtual environment and installed ipython[all] and jupyter with pip. When I run jupyter lab, open a notebook, and try importing a package I installed inside the virtual environment, I get "ModuleNotFoundError."

在控制台中运行ipython并导入作品.另外,which jupyter确实使我指向了虚拟环境中正确的可执行文件.

Running ipython in the console and importing works. Also, which jupyter does point me to the right executable in the virtual environment.

推荐答案

除了安装jupyter外,我还需要安装jupyter lab.否则,甚至虚拟环境jupyter可执行文件实际上也会默默地退回到Jupyter Lab系统的安装中.

In addition to installing jupyter, I need to install jupyter lab. Otherwise, even the virtual environment jupyter executable actually silently falls back to the system Jupyter Lab installation.

这篇关于Jupyter Lab未使用虚拟环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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