Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to install fastembed in windows machine. #305

Open
kranthi419 opened this issue Jul 21, 2024 · 3 comments
Open

Not able to install fastembed in windows machine. #305

kranthi419 opened this issue Jul 21, 2024 · 3 comments

Comments

@kranthi419
Copy link

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

@philsv
Copy link

philsv commented Jul 23, 2024

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.

@Anush008 Anush008 linked a pull request Aug 7, 2024 that will close this issue
@I8dNLo
Copy link
Contributor

I8dNLo commented Aug 26, 2024

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

@sadaisystems
Copy link

sadaisystems commented Aug 31, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants