pyarmor
pyarmor copied to clipboard
[BUG] ModuleNotFoundError: No module named 'distutils'
Hi, I noticed that using Python 3.12 there still seems to be a dependency to 'distutils' in some commands. e.g. 'pyarmor reg'.
With python 3.11, 'pyarmor reg' runs as expected. With python 3.12, 'pyarmor reg' returns the following error:
(venv3.12) [redacted]@[redacted]:~ # pyarmor reg
Traceback (most recent call last):
File "/venv3.12/bin/pyarmor", line 5, in <module>
from pyarmor.pyarmor import main_entry_8
File "/venv3.12/lib/python3.12/site-packages/pyarmor/pyarmor.py", line 47, in <module>
from project import Project
File "/venv3.12/lib/python3.12/site-packages/pyarmor/project.py", line 43, in <module>
from distutils.filelist import FileList
ModuleNotFoundError: No module named 'distutils'
If I manually install setuptools by running 'pip install setuptools', I am able to work around the error.
Installed version:
(venv3.12) [redacted]@[redacted]:~ # pyarmor
INFO Python 3.12.1
INFO Pyarmor 8.4.7 (basic), [00xxxx], [redacted]
INFO Platform linux.x86_64
Got it. It will be fixed in next release.
这个问题已经修复了吗?能否先发一个版本,客户端只能使用python 3.12
应用这个补丁 e9e3d9e72f90521fbd4a0fbcfe6715cc3e4b2f10 即可
The other solution is to install package pyarmor.cli
instead pyarmor
if only using Pyarmor 8 features. For example
pip uninstall pyarmor
pip install pyarmor.cli
Fixed in v8.5.0