简体   繁体   English

python3.10和python3.7如何同时运行?

[英]How to run together python3.10 and python3.7?

I have a code which is written with python3.7 Because of python3.7 doesnt have switch-case I wrote another code script with python3.10 I need to run these two code snippets together.我有一个用 python3.7 编写的代码因为 python3.7 没有 switch-case 我用 python3.10 编写了另一个代码脚本我需要一起运行这两个代码片段。 I dont know how to do it due to version difference.由于版本差异,我不知道该怎么做。 I cannot change the code with python3.7 because it has pysnmp and it runs only 3.7 version.我不能用 python3.7 更改代码,因为它有 pysnmp 并且它只运行 3.7 版本。 I run my first code with python3.7 like: python3 test.py But python3.10 code it doesnt work.我用 python3.7 运行我的第一个代码,如:python3 test.py 但 python3.10 代码不起作用。 Can anybody help me with this issue?有人可以帮我解决这个问题吗?

I cannot change the code with python3.7 because it has pysnmp and it runs only 3.7 version.我不能用 python3.7 更改代码,因为它有 pysnmp 并且它只运行 3.7 版本。

The original version of pysnmp is not supported anymore (due to unfortunate circumstances ), and a maintained fork is now available as pysnmplib . pysnmp 的原始版本不再受支持(由于不幸的情况),并且维护的分支现在可以作为pysnmplib 使用 This version supports Python >= 3.8.此版本支持 Python >= 3.8。 Using that instead will allow you to run everything on 3.10.使用它可以让你在 3.10 上运行所有东西。

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

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