Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.12不支持,No module named 'distutils' #357

Closed
buyaoyongroot opened this issue Oct 25, 2023 · 5 comments
Closed

3.12不支持,No module named 'distutils' #357

buyaoyongroot opened this issue Oct 25, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@buyaoyongroot
Copy link

buyaoyongroot commented Oct 25, 2023

是否使用了最新代码

Bug描述
(one) C:\Users\JM\Desktop\OneForAll-0.4.5>python oneforall.py -target baidu.com run
Traceback (most recent call last):
File "C:\Users\JM\Desktop\OneForAll-0.4.5\oneforall.py", line 15, in
import export
File "C:\Users\JM\Desktop\OneForAll-0.4.5\export.py", line 13, in
from common import utils
File "C:\Users\JM\Desktop\OneForAll-0.4.5\common\utils.py", line 13, in
from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'

随着Python 3.12的发布,distutils终于被移除。根据 PEP 632,distutils 在 Python 3.10 中被标记为废弃,在 Python 3.12 中将不再是标准库的一部分。从distutils中导入将导致一个错误,因为不会有向后兼容的情况出现

运行环境

  • 系统:[win10](必写)
  • Python版本:[3.12](必写)
  • OneForAll版本:[0.4.5](必写)

如何复现
不兼容3.12

复现命令(必写)
python oneforall.py -target baidu.com run

报错文本
(one) C:\Users\JM\Desktop\OneForAll-0.4.5>python oneforall.py -target baidu.com run
Traceback (most recent call last):
File "C:\Users\JM\Desktop\OneForAll-0.4.5\oneforall.py", line 15, in
import export
File "C:\Users\JM\Desktop\OneForAll-0.4.5\export.py", line 13, in
from common import utils
File "C:\Users\JM\Desktop\OneForAll-0.4.5\common\utils.py", line 13, in
from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'

预期结果
正常运行

实际结果
ModuleNotFoundError: No module named 'distutils'

屏幕截图
完整OneForAll执行流程截图(建议上传)

日志上传
上传oneforall.log日志文件(复杂问题建议上传)

其他补充
关于bug的其他一些补充说明

@buyaoyongroot buyaoyongroot added the bug Something isn't working label Oct 25, 2023
@buyaoyongroot buyaoyongroot changed the title 请填写BUG标题 3.12不支持,No module named 'distutils' Oct 25, 2023
@maple67
Copy link

maple67 commented Nov 14, 2023

这个怎么操作的

@maple67
Copy link

maple67 commented Nov 15, 2023

3.12,亲测成功

@lishixin7777
Copy link

我也是失败

@m4ra7h0n
Copy link

m4ra7h0n commented Apr 3, 2024

pip install setuptools
pip uninstall exrex
pip install exrex

@JrDw0
Copy link
Collaborator

JrDw0 commented May 17, 2024

建议使用venv或者pipenv的独立python3.6环境安装

@JrDw0 JrDw0 closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants