roshan-research / hazm

Persian NLP Toolkit
https://www.roshan-ai.ir/hazm/
MIT License
1.16k stars 181 forks source link

اشکال در نصب بسته در ویندوز #330

Closed foadesmaeili5 closed 3 months ago

foadesmaeili5 commented 3 months ago

سلام من ویندوز ۱۰ استفاده میکنم موقع نصب با خطای زیر بر میخورم که گویا یکی از بسته های پیش نیاز(pkgutil) این بسته اسم تابعی رو تغییر داده میشه لطف کنین و بررسی کنین مرسی(متن خطا رو بولد کردم):

C:\Users\foad>pip install hazm
Collecting hazm
Using cached hazm-0.10.0-py3-none-any.whl.metadata (11 kB)
Collecting fasttext-wheel<0.10.0,>=0.9.2 (from hazm)
Using cached fasttext_wheel-0.9.2-cp312-cp312-win_amd64.whl.metadata (16 kB)
Collecting flashtext<3.0,>=2.7 (from hazm)
Using cached flashtext-2.7.tar.gz (14 kB)
Preparing metadata (setup.py) ... done
Collecting gensim<5.0.0,>=4.3.1 (from hazm)
Using cached gensim-4.3.2.tar.gz (23.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: nltk<4.0.0,>=3.8.1 in c:\users\foad\appdata\local\programs\python\python312\lib\site-packages (from hazm) (3.8.1)
Collecting numpy==1.24.3 (from hazm)
Using cached numpy-1.24.3.tar.gz (10.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1
╰─> [33 lines of output]
Traceback (most recent call last):
File "C:\Users\foad\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main()
File "C:\Users\foad\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\foad\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 112, in get_requires_for_build_wheel backend = _build_backend()
^^^^^^^^^^^^^^^^
File "C:\Users\foad\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 77, in _build_backend obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\foad\AppData\Local\Programs\Python\Python312\Lib\importlib__init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "C:\Users\foad\AppData\Local\Temp\pip-build-env-c7le55w0\overlay\Lib\site-packages\setuptools\
init.py", line 16, in
import setuptools.version
File "C:\Users\foad\AppData\Local\Temp\pip-build-env-c7le55w0\overlay\Lib\site-packages\setuptools\version.py", line 1, in
import pkg_resources
File "C:\Users\foad\AppData\Local\Temp\pip-build-env-c7le55w0\overlay\Lib\site-packages\pkg_resources\
init__.py", line 2172, in
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?**
[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.

sir-kokabi commented 3 months ago

سلام. هضم در حال حاضر با پایتون 3.12 سازگار نیست. از پایتون 3.11 استفاده کنید. دلیلش رو می‌تونید در ایشوی https://github.com/roshan-research/hazm/issues/322 بخونید. من با اجازه‌تون این ایشو رو چون تکراری هست می‌بندم. اگر مطلبی داشتید در ادامهٔ همون ایشو مطرح کنید.