如何在 jupyter Notebook 或 google colab 中使用特定版本(低于 3.4)的 python?
我必须对大脑数据进行数据分析,并且在加载数据之前需要满足一些要求。要求之一是我的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能与此
我不确定你是否可以在 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.