fastembed icon indicating copy to clipboard operation
fastembed copied to clipboard

Not able to install fastembed in windows machine.

Open kranthi419 opened this issue 1 year ago • 3 comments

What happened?

i was trying to install fastembed in my windows pc. But, i'm getting the followining error. Building wheels for collected packages: PyStemmer Building wheel for PyStemmer (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [18 lines of output] C:\ML-projects\test\venv\lib\site-packages\setuptools_init_.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************

  !!
    dist.fetch_build_eggs(dist.setup_requires)
  running bdist_wheel
  running build
  running build_ext
  cythoning src/Stemmer.pyx to src\Stemmer.c
  c:\users\kranthi\pip-install-zwgss1_4\pystemmer_91e54316d52b417ba25745a6f1a176d1\.eggs\cython-0.29.37-py3.8.egg\Cython\Compile

r\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\kranthi\Local\Temp\pip-install-zwgss1_4\pystemmer_91e54316d52b417ba25745a6f1a176d1\src\Stemmer.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'Stemmer' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output]

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

What Python version are you on? e.g. python --version

tried with python 3.8 and 3.11

Version

0.2.7 (Latest)

What os are you seeing the problem on?

Windows

Relevant stack traces and/or logs

No response

kranthi419 avatar Jul 21 '24 03:07 kranthi419

Same issue for me on WSL2, tested on 3.11.6

      src/Stemmer.c:6:10: fatal error: Python.h: No such file or directory
          6 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyStemmer
Failed to build PyStemmer
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (PyStemmer)

I had to do a sudo apt-get install python3.11-dev to make it work.

philsv avatar Jul 23 '24 22:07 philsv

Could you please provide a little bit more details? I tried to reproduce it with python 3.8.10, 3.11.6 and 3.11.9 and it install perfectly. I used:

  1. spoon to install poetry
  2. pyenv to manage different pythons
  3. Build tools 2022 to build pystemmer

I8dNLo avatar Aug 26 '24 21:08 I8dNLo

@I8dNLo. Maybe this one will help.

Seems to be also present in python 3.12.

error: Failed to prepare distributions Caused by: Failed to fetch wheel: pystemmer==2.2.0.1 Caused by: Build backend failed to build wheel through build_wheel() with exit status: 1 --- stdout: running bdist_wheel running build running build_ext skipping 'src/Stemmer.c' Cython extension (up-to-date) building 'Stemmer' extension clang -pthread -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -fPIC -fPIC -Ilibstemmer_c-2.2.0/include -I/home/magnesium/.cache/uv/builds-v0/.tmpLU19Sw/include -I/home/magnesium/.local/share/uv/python/cpython-3.12.5-linux-x86_64-gnu/include/python3.12 -c libstemmer_c-2.2.0/libstemmer/libstemmer_utf8.c -o build/temp.linux-x86_64-cpython-312/libstemmer_c-2.2.0/libstemmer/libstemmer_utf8.o --- stderr: error: command 'clang' failed: No such file or directory

I used uv package manager with python 3.12.5. WSL2

sadaisystems avatar Aug 31 '24 17:08 sadaisystems