zafercavdar / fasttext-langdetect

80x faster and 95% accurate language identification with Fasttext
MIT License
141 stars 21 forks source link

Can't pip install on windows 1.0.5 version #14

Open GBurg opened 1 year ago

GBurg commented 1 year ago

I tried to install fasttext-langdetect, but I get the following error:

Building wheels for collected packages: fasttext
  Building wheel for fasttext (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [75 lines of output]
      C:\Users\geert\miniconda3\envs\whisperspacy\lib\site-packages\setuptools\dist.py:745: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!

              ********************************************************************************
              Usage of dash-separated 'description-file' will not be supported in future
              versions. Please use the underscore name 'description_file' instead.

              By 2023-Sep-26, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************

      !!
        opt = self.warn_dash_deprecation(opt, section)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-310
      creating build\lib.win-amd64-cpython-310\fasttext
      copying python\fasttext_module\fasttext\FastText.py -> build\lib.win-amd64-cpython-310\fasttext
      copying python\fasttext_module\fasttext\__init__.py -> build\lib.win-amd64-cpython-310\fasttext
      creating build\lib.win-amd64-cpython-310\fasttext\util
      copying python\fasttext_module\fasttext\util\util.py -> build\lib.win-amd64-cpython-310\fasttext\util
      copying python\fasttext_module\fasttext\util\__init__.py -> build\lib.win-amd64-cpython-310\fasttext\util
      creating build\lib.win-amd64-cpython-310\fasttext\tests
      copying python\fasttext_module\fasttext\tests\test_configurations.py -> build\lib.win-amd64-cpython-310\fasttext\tests
      copying python\fasttext_module\fasttext\tests\test_script.py -> build\lib.win-amd64-cpython-310\fasttext\tests
      copying python\fasttext_module\fasttext\tests\__init__.py -> build\lib.win-amd64-cpython-310\fasttext\tests
      running build_ext
      building 'fasttext_pybind' extension
      creating build\temp.win-amd64-cpython-310
      creating build\temp.win-amd64-cpython-310\Release
      creating build\temp.win-amd64-cpython-310\Release\python
      creating build\temp.win-amd64-cpython-310\Release\python\fasttext_module
      creating build\temp.win-amd64-cpython-310\Release\python\fasttext_module\fasttext
      creating build\temp.win-amd64-cpython-310\Release\python\fasttext_module\fasttext\pybind
      creating build\temp.win-amd64-cpython-310\Release\src

  ... etc ...

  error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for fasttext
  Running setup.py clean for fasttext
Failed to build fasttext
ERROR: Could not build wheels for fasttext, which is required to install pyproject.toml-based projects

Is there a different wheel I could try?

UndefinedConstant commented 1 year ago

Got the same problem in a different flavor pybind11 as well, adding my output from cmd since not using conda, hoping the traceback will be of help for the devs

Collecting fasttext-langdetect Using cached fasttext-langdetect-1.0.5.tar.gz (6.8 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting fasttext>=0.9.1 (from fasttext-langdetect) Using cached fasttext-0.9.2.tar.gz (68 kB) 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 ╰─> [25 lines of output] C:\Users\MASTER\AppData\Local\Programs\Python\Python38\python.exe: No module named pip Traceback (most recent call last): File "", line 38, in init ModuleNotFoundError: No module named 'pybind11'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\Users\MASTER\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\Users\MASTER\AppData\Local\Programs\Python\Python38\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\MASTER\AppData\Local\Programs\Python\Python38\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\MASTER\AppData\Local\Temp\pip-build-env-o32evsos\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "C:\Users\MASTER\AppData\Local\Temp\pip-build-env-o32evsos\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
      self.run_setup()
    File "C:\Users\MASTER\AppData\Local\Temp\pip-build-env-o32evsos\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
      super(_BuildMetaLegacyBackend,
    File "C:\Users\MASTER\AppData\Local\Temp\pip-build-env-o32evsos\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
      exec(code, locals())
    File "<string>", line 72, in <module>
    File "<string>", line 41, in __init__
  RuntimeError: pybind11 install failed.
  [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.

photkey commented 1 year ago

+1

Khyretos commented 1 year ago

+1

ulan-yisaev commented 1 year ago

Got the same error in Windows, but in the WSL2 it installs and works perfectly.

balbirthomas commented 10 months ago

+1

This problem is not windows specific but I have also seen it on GNU/Linux.

thiswillbeyourgithub commented 10 months ago

Same here. No workarounds ?

sudoskys commented 10 months ago

@thiswillbeyourgithub @balbirthomas I made a fork to solve this problem.

thiswillbeyourgithub commented 10 months ago

Thanks. Still problematic for my friends who don't know how to use git but only pip

sudoskys commented 10 months ago

Thanks. Still problematic for my friends who don't know how to use git but only pip

@thiswillbeyourgithub If you can provide more information or submit an issue, it will be better. I have uploaded it on pypi.

thiswillbeyourgithub commented 10 months ago

Hello again. Thank you.

Is this the repo you uploaded the fixed PR to ? https://pypi.org/project/fast-langdetect/

I'll tell my friend to try again to pip install and report back.

sudoskys commented 10 months ago

Hello again. Thank you.你好,又来了。谢谢。

Is this the repo you uploaded the fixed PR to ? https://pypi.org/project/fast-langdetect/这是您上传固定 PR 的 repo 吗?https://pypi.org/project/fast-langdetect/

I'll tell my friend to try again to pip install and report back.我会告诉我的朋友再次尝试pip安装并报告。

Yes,it is @thiswillbeyourgithub

AzzamWasTaken commented 10 months ago

Found this while trying to figure out a way to solve it, mine was solved by just installing python 3.9 yours indicating it is 3.10

might be helpful.

~Azzam

thiswillbeyourgithub commented 10 months ago

My friend tells me he successfuly pip installed it. Thank you very much!