解决OneForAll 安装过程中的问题 cannot import name 'sre_parse' from 're'

使用 python 3.11 及以上版本时oneforall会出现一个 cannot import name 'sre_parse' from 're' 的报错。

image

解决方法:

  1. pip 卸载重装新版exrex库,作者已经修复该问题。
pip uninstall exrex
pip install exrex

image

  1. 修改exrex.py的代码,直接导入 sre_parse 模块。
    image
posted @ 2023-08-06 13:18  mightnire  阅读(3446)  评论(0)    收藏  举报