Not able to install fastembed in windows machine.
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
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.
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:
- spoon to install poetry
- pyenv to manage different pythons
- Build tools 2022 to build pystemmer
@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