vict-cn / crawlBaiduWenku

这可能是爬百度文库最全的项目了
MIT License
67 stars 35 forks source link

AttributeError: module 'distutils.util' has no attribute 'run_2to3' #4

Open Leoguo101 opened 1 month ago

Leoguo101 commented 1 month ago

I was trying to install requirement.txt, getting the error of " AttributeError: module 'distutils.util' has no attribute 'run_2to3' "

Tried with pip uninstall setuptools to downgrade to different version, or upgrade to newest version of setuptools, but still facing the same error.

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting requests==2.21.0 (from -r requirement.txt (line 1)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl (57 kB) Collecting reportlab==3.5.32 (from -r requirement.txt (line 2)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9b/e0/97b334f0e6a805c921ac369a153cea6ea822787a1d8247c7e65b1386c520/reportlab-3.5.32.tar.gz (2.9 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting Pillow==5.4.1 (from -r requirement.txt (line 3)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/3c/7e/443be24431324bd34d22dd9d11cc845d995bcd3b500676bcf23142756975/Pillow-5.4.1.tar.gz (16.0 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting selenium==2.4.0 (from -r requirement.txt (line 4)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/53/5e/b5cfd3c1423f35eb5a9e60946142ca9ecb3708e26e24de5fc854b807c4d3/selenium-2.4.0.tar.gz (2.1 MB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

Leoguo101 commented 1 month ago

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [22 lines of output] no previously-included directories found matching '*' Traceback (most recent call last): File "C:\Users\T600\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\T600\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\T600\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\T600\AppData\Local\Temp\pip-build-env-sz70_riu\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\T600\AppData\Local\Temp\pip-build-env-sz70_riu\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires self.run_setup() File "C:\Users\T600\AppData\Local\Temp\pip-build-env-sz70_riu\overlay\Lib\site-packages\setuptools\build_meta.py", line 503, in run_setup super().run_setup(setup_script=setup_script) File "C:\Users\T600\AppData\Local\Temp\pip-build-env-sz70_riu\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup exec(code, locals()) File "", line 64, in File "", line 44, in setup_python3 AttributeError: module 'distutils.util' has no attribute 'run_2to3' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.