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

can not install in setuptools>v57 environment #9

Open
momijiame opened this issue Feb 17, 2022 · 1 comment · May be fixed by #12
Open

can not install in setuptools>v57 environment #9

momijiame opened this issue Feb 17, 2022 · 1 comment · May be fixed by #12

Comments

@momijiame
Copy link

Abstract

I found that xfeat could not be installed in an environment where the version of setuptools was v58 or higher. This issue may be due to the fact that 'ml_metrics' which xfeat depends on, ml_metrics uses 'use_2to3' option.

https://github.com/zhouyonglong/ml_metrics/blob/master/Python/setup.py#L14

However, use_2to3 option is already not supported in setuptools v58 or higher.

https://setuptools.pypa.io/en/latest/history.html#v58-0-0

Therefore, the installation will fail with the following error.

$ pip install xfeat            
Collecting xfeat
  Downloading xfeat-0.1.1-py3-none-any.whl (39 kB)
Collecting ml-metrics
  Downloading ml_metrics-0.1.4.tar.gz (5.0 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in ml_metrics setup command: use_2to3 is invalid.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Note that if you have installed xfeat in the past in an environment with setuptools<v58, the installation will succeed with cached wheels.

Workaround

Downgrade setuptools < v58 and install xfeat.

$ pip install -U "setuptools<58"
$ pip install xfeat

Environment

$ sw_vers
ProductName:	macOS
ProductVersion:	12.2.1
BuildVersion:	21D62
$ python -V 
Python 3.9.10
$ pip list
Package    Version
---------- -------
pip        22.0.3
setuptools 60.6.0
wheel      0.37.1
@momijiame
Copy link
Author

IMHO, This may be a issue that ml_metrics should have solved originally. However, that package has not been updated in 6 years, and I am interested in xfeat, so I reported it here first.

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.

1 participant