![](/img/trans.png)
[英]Facing Import Error while running the imported packages in jupyter notebook of VS code
[英]Tornado will import in Jupyter but not VS Code
我可以毫无问题地在我的 Jupyter Notebook 中导入 Tornado,但是当我尝试在 VS Code 中这样做时,我收到以下错误ModuleNotFoundError: No module named 'tornado'
。
我使用 Anaconda, conda conda install -c conda-forge tornado
forge tornado 安装了 Tornado,但我不知道这对 Jupyter 和 VS Code 有何影响。 有什么想法可以让 Tornado 在 VSC 上运行吗?
您需要在 Visual Studio 代码中使用 select 正确的 python 解释器,以下链接可能有助于为您的代码选择正确的 python 解释器。
https://code.visualstudio.com/docs/python/environments
此外,我相信您应该使用虚拟环境来有效管理 package,以便在 Jupiter Notebook 中集成正确的虚拟环境
让我知道这是怎么回事。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.