python setup.py egg_info did not run successfully. exit code: 1
Question:
Tried to download the package feature_selector
.
Introduced pip install feature_selector
And got this error:
Collecting feature_selector
Using cached feature_selector-1.0.0-py3-none-any.whl (21 kB)
Collecting seaborn==0.8.1
Using cached seaborn-0.8.1.tar.gz (178 kB)
Preparing metadata (setup.py) ... done
Collecting pandas==0.23.1
Using cached pandas-0.23.1.tar.gz (13.1 MB)
Preparing metadata (setup.py) ... done
Collecting scikit-learn==0.19.1
Using cached scikit-learn-0.19.1.tar.gz (9.5 MB)
Preparing metadata (setup.py) ... done
Collecting lightgbm==2.1.1
Using cached lightgbm-2.1.1-py2.py3-none-manylinux1_x86_64.whl (711 kB)
Collecting matplotlib==2.1.2
Using cached matplotlib-2.1.2.tar.gz (36.2 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [71 lines of output]
IMPORTANT WARNING:
pkg-config is not installed.
matplotlib may not be able to find some of its dependencies
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [2.1.2]
python: yes [3.8.10 (default, Mar 15 2022, 12:22:08) [GCC
9.4.0]]
platform: yes [linux]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.22.2]
six: yes [using six version 1.16.0]
dateutil: yes [using dateutil version 2.8.2]
backports.functools_lru_cache: yes [Not required]
subprocess32: yes [Not required]
pytz: yes [using pytz version 2021.3]
cycler: yes [using cycler version 0.10.0]
tornado: yes [using tornado version 6.1]
pyparsing: yes [using pyparsing version 3.0.7]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype2 (ft2build.h)
could not be found. You may need to install the
development package.]
png: no [pkg-config information for 'libpng' could not
be found.]
qhull: yes [pkg-config information for 'libqhull' could not
be found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: no [skipping due to configuration]
toolkits_tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
macosx: no [Mac OS-X only]
qt5agg: no [PySide2 not found; PyQt5 not found]
qt4agg: no [PySide not found; PyQt4 not found]
gtk3agg: no [Requires pygobject to be installed.]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-r4l4iwft/matplotlib_dc4d5c9010ec47f683a393a9a7c83d4f/setup.py", line 216, in <module>
pkg_help = pkg.install_help_msg()
File "/tmp/pip-install-r4l4iwft/matplotlib_dc4d5c9010ec47f683a393a9a7c83d4f/setupext.py", line 595, in install_help_msg
release = platform.linux_distribution()[0].lower()
AttributeError: module 'platform' has no attribute 'linux_distribution'
gtk3cairo: no [Requires cairocffi or pycairo to be installed.]
gtkagg: no [Requires pygtk]
tkagg: yes [installing; run-time loading from Python Tcl /
Tk]
wxagg: no [requires wxPython]
gtk: no [Requires pygtk]
agg: yes [installing]
cairo: no [cairocffi or pycairo not found]
windowing: no [Microsoft Windows only]
OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: no
latex: no
pdftops: no
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
============================================================================
[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.
Answers:
Worked through all the existing suggestions – I found I had to pip install Cython
(Windows) (eg I had updated pip, ez_setup, setuptools, mysqlclient, flask-mysqldb and more with no joy)
Tried to download the package feature_selector
.
Introduced pip install feature_selector
And got this error:
Collecting feature_selector
Using cached feature_selector-1.0.0-py3-none-any.whl (21 kB)
Collecting seaborn==0.8.1
Using cached seaborn-0.8.1.tar.gz (178 kB)
Preparing metadata (setup.py) ... done
Collecting pandas==0.23.1
Using cached pandas-0.23.1.tar.gz (13.1 MB)
Preparing metadata (setup.py) ... done
Collecting scikit-learn==0.19.1
Using cached scikit-learn-0.19.1.tar.gz (9.5 MB)
Preparing metadata (setup.py) ... done
Collecting lightgbm==2.1.1
Using cached lightgbm-2.1.1-py2.py3-none-manylinux1_x86_64.whl (711 kB)
Collecting matplotlib==2.1.2
Using cached matplotlib-2.1.2.tar.gz (36.2 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [71 lines of output]
IMPORTANT WARNING:
pkg-config is not installed.
matplotlib may not be able to find some of its dependencies
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [2.1.2]
python: yes [3.8.10 (default, Mar 15 2022, 12:22:08) [GCC
9.4.0]]
platform: yes [linux]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.22.2]
six: yes [using six version 1.16.0]
dateutil: yes [using dateutil version 2.8.2]
backports.functools_lru_cache: yes [Not required]
subprocess32: yes [Not required]
pytz: yes [using pytz version 2021.3]
cycler: yes [using cycler version 0.10.0]
tornado: yes [using tornado version 6.1]
pyparsing: yes [using pyparsing version 3.0.7]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype2 (ft2build.h)
could not be found. You may need to install the
development package.]
png: no [pkg-config information for 'libpng' could not
be found.]
qhull: yes [pkg-config information for 'libqhull' could not
be found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: no [skipping due to configuration]
toolkits_tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
macosx: no [Mac OS-X only]
qt5agg: no [PySide2 not found; PyQt5 not found]
qt4agg: no [PySide not found; PyQt4 not found]
gtk3agg: no [Requires pygobject to be installed.]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-r4l4iwft/matplotlib_dc4d5c9010ec47f683a393a9a7c83d4f/setup.py", line 216, in <module>
pkg_help = pkg.install_help_msg()
File "/tmp/pip-install-r4l4iwft/matplotlib_dc4d5c9010ec47f683a393a9a7c83d4f/setupext.py", line 595, in install_help_msg
release = platform.linux_distribution()[0].lower()
AttributeError: module 'platform' has no attribute 'linux_distribution'
gtk3cairo: no [Requires cairocffi or pycairo to be installed.]
gtkagg: no [Requires pygtk]
tkagg: yes [installing; run-time loading from Python Tcl /
Tk]
wxagg: no [requires wxPython]
gtk: no [Requires pygtk]
agg: yes [installing]
cairo: no [cairocffi or pycairo not found]
windowing: no [Microsoft Windows only]
OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: no
latex: no
pdftops: no
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
============================================================================
[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.
Worked through all the existing suggestions – I found I had to pip install Cython
(Windows) (eg I had updated pip, ez_setup, setuptools, mysqlclient, flask-mysqldb and more with no joy)