如何在 jupyter Notebook 或 google colab 中使用特定版本(低于 3.4)的 python?

发布于 2025-01-12 04:08:17 字数 296 浏览 3 评论 0原文

我必须对大脑数据进行数据分析,并且在加载数据之前需要满足一些要求。要求之一是我的python版本要低于3.4。 我和我的团队想在 google colab 中一起编写代码,但最初在 jupyter 笔记本中编写也可以。我只是找不到一种方法来运行较低版本的 python 代码。如果没有较低版本,它就无法工作。我知道我可以执行 !apt-get install python3.3 并且这似乎有效。然而,当我调用 !python --version 时,它仍然给出 3.7.12 作为输出。如何确保我可以在旧版本中运行我的代码?

I have to do data-analysis on brain data and there are some requirements that need to be met before I can load the data. One of the requirements is that my python version should be lower than 3.4.
My group and I want to work on the code together in google colab but doing it in jupyter notebook initially is fine as well. I just can't find a way to run code with a lower python version. Without a lower version it just won't work. I know I can do !apt-get install python3.3 and that appears to work. When I call !python --version however, it still gives 3.7.12 as an output. How do I make sure I can run my code in an older version?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泡沫很甜 2025-01-19 04:08:17

这可能与

我不确定你是否可以在 google colab 中实现这一点。您可以尝试卸载某个版本,然后安装您想要的版本。

This might be a duplicate of this

I'm not sure if you can achieve this in google colab. You can try to uninstall a version and then install the one you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文