fasttext-langdetect icon indicating copy to clipboard operation
fasttext-langdetect copied to clipboard

Can't pip install on windows 1.0.5 version

Open GBurg opened this issue 2 years ago • 13 comments

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?

GBurg avatar Jul 20 '23 09:07 GBurg

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.

UndefinedConstant avatar Jul 26 '23 07:07 UndefinedConstant

+1

photkey avatar Jul 29 '23 21:07 photkey

+1

Khyretos avatar Aug 23 '23 11:08 Khyretos

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

ulan-yisaev avatar Aug 28 '23 13:08 ulan-yisaev

+1

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

balbirthomas avatar Jan 05 '24 15:01 balbirthomas

Same here. No workarounds ?

thiswillbeyourgithub avatar Jan 17 '24 12:01 thiswillbeyourgithub

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

sudoskys avatar Jan 19 '24 17:01 sudoskys

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

thiswillbeyourgithub avatar Jan 19 '24 18:01 thiswillbeyourgithub

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.

sudoskys avatar Jan 20 '24 03:01 sudoskys

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.

thiswillbeyourgithub avatar Jan 22 '24 14:01 thiswillbeyourgithub

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

sudoskys avatar Jan 22 '24 15:01 sudoskys

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

AzzamWasTaken avatar Jan 25 '24 00:01 AzzamWasTaken

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

thiswillbeyourgithub avatar Jan 25 '24 09:01 thiswillbeyourgithub