-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
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 xfeatEnvironment
$ 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.1hiromuhana, AtsunoriFujita, tueda, khirotaka and playnik94
Metadata
Metadata
Assignees
Labels
No labels