Python3.11修改并运行oneforall

遇到的问题

使用python3.11默认无法运行oneforall脚本,出现如下报错

# 解决方案

修改 /usr/local/lib/python3.11/dist-packages/exrex.py

exrex.py具体文件路径报错中会显示

复制代码
vim /usr/local/lib/python3.11/dist-packages/exrex.py

# 修改前

复制代码
from re import sre_parse, U
from itertools import tee
from random import choice, randint
from types import GeneratorType

# 修改后

复制代码
#from re import sre_parse, U
import sre_parse
from re import U
from itertools import tee
from random import choice, randint
from types import GeneratorType

# 问题解决

相关推荐
SelectDB2 小时前
Litefuse 开源并推出单进程轻量模式,25 秒就能跑起来的 Agent 可观测与评估平台
运维·后端·自动化运维
AlfredZhao3 小时前
Docker 容器时区不对,`timedatectl` 不存在怎么办?
linux·timezone
zzzzzz3101 天前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
XIAOHEZIcode1 天前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏
用户0328472220702 天前
如何搭建本地yum源(上)
运维
A小辣椒3 天前
TShark:Wireshark CLI 功能
linux
A小辣椒3 天前
TShark:基础知识
linux
AlfredZhao4 天前
OCI 明明分配了 200G 系统盘,为什么 df 只看到 30G?
linux·oci
AlfredZhao4 天前
vi 删除指定范围的行,不用再反复按 dd
linux·vi
用户9718356334664 天前
银河麒麟 KY10 申威(SW64) 安装 nginx-1.16.1-2.p01.ky10.sw_64.rpm 详细步骤
linux