Python3.11修改并运行oneforall

news/2024/10/19 20:53:03/

遇到的问题

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

image.png

# 解决方案

修改 /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

image.png

# 修改后

#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

image.png

# 问题解决

image.png


http://www.ppmy.cn/news/1438389.html

相关文章

在 TypeScript 中declare module 关键字用法

在 TypeScript 中,declare module 关键字用于声明模块的类型信息,这种声明通常出现在声明文件(通常是 .d.ts 文件)中。这对于当你需要为现有的 JavaScript 库或模块提供类型信息时非常有用,尤其是对于没有提供自己的类…

g 对象:Flask 应用中的“临时口袋”

文章目录 g对象的理解Flask 中的 g 对象g 对象的特点:使用 g 对象: 示例 g对象的理解 想象一下,你在逛超市。你需要一个购物篮来装你挑选的商品。这个购物篮就像 Flask 应用中的 g 对象,它是一个临时存放东西的地方,方便你在购物过程中随时取…

【设计模式】11、flyweight 享元模式

文章目录 十一、flyweight11.1 pool 连接池11.1.1 pool_test.go11.1.2 pool.go11.1.3 conn.go 11.2 chess_board11.2.1 chess_test.go11.2.2 chess.go 十一、flyweight https://refactoringguru.cn/design-patterns/flyweight 大量重复的对象, 如果很消耗资源, 没必要每次都初…

学习Rust的第11天:模块系统

Rust的模块系统可以使用它来管理不断增长的项目,并跟踪 modules 存储在何处。 Rust的模块系统是将代码组织成逻辑片段的有效工具,因此可以实现代码维护和重用。模块支持分层组织、隐私管理和代码封装。Rust为开发人员提供了多功能和可扩展的方法来管理项…

Ansible安装基本原理及操作(初识)

作者主页:点击! Ansible专栏:点击! 创作时间:2024年4月23日15点18分 Ansible 是一款功能强大且易于使用的IT自动化工具,可用于配置管理、应用程序部署和云端管理。它使用无代理模式(agentles…

关于MCU核心板的一些常见问题

BGA植球与焊接(多涂焊油): 【BGA芯片是真麻烦,主要是植锡珠太麻烦了,拆一次就得重新植】https://www.bilibili.com/video/BV1vW4y1w7oNvd_source3cc3c07b09206097d0d8b0aefdf07958 / NC电容一般有两种含义&#xff1…

ubuntu中可以查看照片的程序

ubuntu中可以查看照片的程序 在Ubuntu中,您可以使用多种图片查看器来查看照片。以下是几个常用的图片查看器: GIMP GIMP是一个免费的开源图片编辑器,它也可以用来查看和打印图片。 安装命令: sudo apt-get update sudo apt-ge…

Recommended Azure Monitors

General This document describes the recommended Azure monitors which can be implemented in Azure cloud application subscriptions. SMT incident priority mapping The priority “Blocker” is mostly used by Developers to prioritize their tasks and its not a…