python-3.x - Python compileall:.pyc 文件中的幻数错误
问题描述
我正在编译一个类似的python脚本:
python3 -m compileall script.py
我正在使用python3.7
,但如果有人在其他 python 版本中运行此脚本,则会出现此问题
RuntimeError: Bad magic number in .pyc file
有什么方法可以编译任何 python3 版本吗?或如何解决?
解决方案
推荐阅读
- go - Go Rod If 按钮
- c++ - 在 CMake 中将标头编译为可执行文件
- angular - 刷新令牌请求被发送两次 - 寻找除 HttpBackend 之外的另一种解决方案
- python - 如何不断更新 Flask 中视图函数中使用的变量?
- javascript - 我怎样才能让我的机器人对反应做出反应?
- r - 使用 sapp() 将 terra::focal 应用于 SpatRaster 的每一层
- python - 将文本输入到 SVG2RLG Python 库
- go - 无效的工作空间配置:golang 中路径中的大小写不匹配
- data-science - 如何解决不可哈希类型的类型错误?
- java - 创建死信队列