如何为 Jupyter Notebook 运行 Python 基础环境?

发布于 2025-01-14 02:41:49 字数 366 浏览 3 评论 0原文

我刚开始使用多个 Python 环境,由于某种原因,我系统中的基本环境不适用于 Jupyter 笔记本。当我尝试从基础环境打开笔记本时,收到错误短语“500:内部服务器错误”。但是,如果我创建一个新环境,我就可以打开笔记本,但即使在安装了必要的模块之后,Python 似乎也无法识别它们。另一个问题是,一旦我在新创建的环境中终止会话,它也会停止工作,并给出错误短语“500:内部服务器错误”。基本上,我必须一次又一次地创建环境,因为基础环境本身功能失调,但所有环境在终止时都会中断。

我还注意到,尽管正确激活了所需的环境(不是基本环境)并从激活的环境中打开笔记本,但“!python --version”和“sys.version”返回两个不同的值。

对于这个问题的任何解决方案将不胜感激。

I am new to using multiple Python environments and for some reason the base environment in my system just will not work for Jupyter notebooks. When I try to open a notebook from the base environment, I am getting the error phrase '500: Internal Server Error'. However, I am able to get notebooks opened if I create a new environment but even after installing the necessary modules, Python does not seem to recognise them. Another issue is that, once I terminate a session in the newly created environment, it too stops working giving the error phrase '500: Internal Server Error'. Basically, I am having to create environments again and again since the base environment itself is dysfunctional yet all the environments break upon termination.

I have also noted that '!python --version' and 'sys.version' returns two different values despite correct activation of the required environment (which is not the base environment) and opening a notebook from the activated environment.

Any solution for this problem will be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文