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

Multiple errors while installing requirements #1

Open
AlexeyArtemev opened this issue Jul 11, 2024 · 3 comments
Open

Multiple errors while installing requirements #1

AlexeyArtemev opened this issue Jul 11, 2024 · 3 comments

Comments

@AlexeyArtemev
Copy link

AlexeyArtemev commented Jul 11, 2024

System info

OS: Windows 11 10.0.22631
Python v.: 3.12.4

Issue

The following errors are being thrown when installing requirements:

ERROR: Ignored the following versions that require a different python version: 0.55.2 Requires-Python <3.5
ERROR: Could not find a version that satisfies the requirement python-docx2txt==0.8 (from versions: none)
ERROR: No matching distribution found for python-docx2txt==0.8

Expected behaviour

pip install -r requirements.txt completing without errors

I'd like to add that it might be a good idea to create a ready-to-use package using python-embed(see more at https://stackoverflow.com/a/77268297) and distribute it via huggingface leaving a link to it in this repo(examples: 1, 2)

@AlexeyArtemev
Copy link
Author

AlexeyArtemev commented Jul 11, 2024

The python-docx2txt is named just docx2txt in pip. After changing this dep in requirements.txt i've encountered another error:

Building wheels for collected packages: faiss-cpu
  Building wheel for faiss-cpu (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for faiss-cpu (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      running bdist_wheel
      running build
      running build_py
      running build_ext
      building 'faiss._swigfaiss' extension
      swigging faiss\faiss\python\swigfaiss.i to faiss\faiss\python\swigfaiss_wrap.cpp
      swig.exe -python -c++ -Doverride= -I/usr/local/include -Ifaiss -doxygen -DSWIGWIN -module swigfaiss -o faiss\faiss\python\swigfaiss_wrap.cpp faiss\faiss\python\swigfaiss.i
      error: command 'swig.exe' failed: None
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for faiss-cpu
Failed to build faiss-cpu
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (faiss-cpu)

According to stackoverflow, the issue lies in the python ver, so the project won't run on python 3.12 and newer unless faiss-cpu is updated to run on it

UPD: the exe missing can be solved by installing swig(swigwin in my case) and adding the installation path to PATH variable, yet pip install -r requirements.txt still throws errors, still related to building wheel for faiss-cpu, all about missing .h files for faiss

@Exlo84
Copy link

Exlo84 commented Jul 17, 2024

System info
OS: Windows 11
Python v.: 3.12.4

first of all, i ran this in virtualenv

changing python-docx2txt to docx2txt
pip install textract(in my case)
download swig.exe and set PATH

change faiss-cpu version to faiss-cpu==1.8.0.post1

THEN it will run on windows 11(atleast in my case)

@YorkieDev
Copy link
Owner

Leaving this open so people can have a solution for issues they're facing on non Mac OS machines. I'll eventually get round to releasing a patch to fix it.

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

No branches or pull requests

3 participants