简体   繁体   English

python 笔记本电脑使用 VS Code 和 miniconda 的问题

[英]Problems with using VS Code and miniconda for python notebooks

I have a conda base environment that I want to use for a python notebook.我有一个想要用于 python 笔记本的 conda 基本环境。 In this base environment I've installed all the packages that I need.在这个基础环境中,我已经安装了我需要的所有包。 However, when I launch a jupyter notebook through vscode, it always gives me a ModuleNotFound error:但是,当我通过 vscode 启动 jupyter notebook 时,它总是给我一个 ModuleNotFound 错误:

代码

I've made sure that my python interpreter (bottom left) is conda base as well as the interpreter in the top right:我已经确保我的 python 解释器(左下角)是 conda base 以及右上角的解释器: 在此处输入图像描述

but the error never goes away.但错误永远不会消失。

The weird thing is that when I launch jupyter lab from terminal in my conda base environment, everything works fine as expected.奇怪的是,当我在我的 conda 基础环境中从终端启动 jupyter lab 时,一切都按预期工作。 What could be causing this error?什么可能导致此错误?

I uninstalled miniconda3 and installed anaconda instead.我卸载了 miniconda3 并安装了 anaconda 。 It magically fixed the problem.它神奇地解决了这个问题。 I love coding.我喜欢编码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM