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

Installation Failure: Invalid Version Specifier in setup.py for extract-msg<=0.29.* #533

Open
shrijayan opened this issue Oct 7, 2024 · 3 comments

Comments

@shrijayan
Copy link

Describe the bug

When trying to install textract==1.6.4, the installation fails due to an issue with the install_requires field in the setup.py file. Specifically, the extract-msg<=0.29.* entry is not a valid version specifier because the .* suffix can only be used with the == or != operators.

To Reproduce

Steps to reproduce the behavior:

  1. Run pip install textract==1.6.4 in a Python environment.
  2. Observe the error during the installation process when building the wheel.

Expected behavior

The package should install successfully without errors.

Error Output

error in textract setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement

specifiers; .* suffix can only be used with `==` or `!=` operators
extract-msg<=0.29.*
             ~~~~~~~^

Desktop (please complete the following information):

  • OS: MacOS
  • Textract version: 1.6.4
  • Python version: 3.11
  • Virtual environment: yes

Additional context

It seems like the issue is related to invalid version specifiers in the setup.py file of the textract package. A potential fix would be to update the version specifier to extract-msg<=0.29 or resolve the versioning conflict.

@jkfran
Copy link

jkfran commented Oct 10, 2024

I am having this issue as well.

@GHUFRAN-HYDER
Copy link

Solution for Installation Failure Due to Invalid Version Specifier in setup.py for extract-msg<=0.29.*

Hi @shrijayan @jkfran,
The issue you're encountering is caused by an invalid version specifier in the requirements/python file being parsed by setup.py. The version constraint extract-msg<=0.29.* is invalid because Python packaging tools like pip only support == or != with the .* suffix.

Proposed Fix:

To fix this issue, modify the requirements/python file as follows:

  1. Find the line that contains:

    extract-msg<=0.29.*
    
  2. Modify it to:

    extract-msg<=0.29
    

    This correction ensures that the version specifier is in a valid format.

  3. After modifying, you can proceed with the installation using the following command:

    python setup.py install

This should resolve the issue and allow you to proceed with the installation without errors. Let me know if this helps or if further assistance is needed!

Best regards,

@NGeorgescu
Copy link

It should be <0.29.6

for now I put the line in my requirements.txt my own fork:

git+https://github.com/ngeorgescu/textract@403943b#egg=textract

not sure when this will be fixed given that there are multiple PRs for this one-character fix.

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

4 participants