当前位置: 首页 > 图灵资讯 > 行业资讯> Python 2.73.5兼容吗

Python 2.73.5兼容吗

发布时间:2025-12-10 16:52:23

Python2.与Python3.5不兼容。

但是,您也可以在计算机中同时下载两个版本,解决方案如下:

用Py的参数调用不同版本的Python。py -调用python2,py -3调用python3。

当python脚本需要python2运行时,只需在脚本前添加python2即可运行 xxx.py即可。

#!python2

当python脚本需要python3运行时,只需将其添加到脚本前面,然后运行python xxx.py即可。

#!python3

相关文章

Python 2.73.5兼容吗

Python 2.73.5兼容吗

2025-12-10
python中*arg是什么意思?

python中*arg是什么意思?

2025-12-10
Python client有什么用

Python client有什么用

2025-12-10
Python中if else语句出错

Python中if else语句出错

2025-12-10
python i18n不能使用

python i18n不能使用

2025-12-10
python iloc用法

python iloc用法

2025-12-10