#5712·nni

pip install nni[SMAC] reports error in version requirements

Author: marcinchomiczCreated Nov 14, 2023Updated Sep 7, 2024

Describe the issue: While installing nni with either 'pip install nni[SMAC]' or 'pip install nni[all]' an error related to minimum version requirement appears: See output at 'log message' section.

Environment:

  • NNI version: current (3.0) online installation using PIP:
  • Training service (local|remote|pai|aml|etc): not relevant
  • Client OS: Ubuntu 18.04LTE
  • Server OS (for remote mode only): not relevant
  • Python version: 3.10
  • PyTorch/TensorFlow version: none
  • Is conda/virtualenv/venv used?: virtualenv
  • Is running in Docker?: no

Configuration:

  • Experiment config (remember to remove secrets!): not relevant
  • Search space: not relevant

Log message: Collecting ConfigSpaceNNI>=0.4.7.3 (from nni[SMAC]) Downloading ConfigSpaceNNI-0.4.7.3.tar.gz (108 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 108.5/108.5 kB 2.2 MB/s eta 0:00:00 Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [28 lines of output] /mnt/workdata/envs/nnioptim/lib/python3.10/site-packages/setuptools/_distutils/extension.py:134: UserWarning: Unknown Extension options: 'compiler_directives' warnings.warn(msg) /mnt/workdata/envs/nnioptim/lib/python3.10/site-packages/setuptools/dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options !!

          ********************************************************************************
          Usage of dash-separated 'description-file' will not be supported in future
          versions. Please use the underscore name 'description_file' instead.

          This deprecation is overdue, please update your project and remove deprecated
          calls to avoid build errors in the future.

          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************

  !!
    opt = self.warn_dash_deprecation(opt, section)
  /mnt/workdata/envs/nnioptim/lib/python3.10/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
  !!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************

  !!
    dist.fetch_build_eggs(dist.setup_requires)
  error in ConfigSpaceNNI setup command: 'python_requires' must be a string containing valid version specifiers; Invalid specifier: '>=3.4.*'
  [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.

How to reproduce it?: Try to install pip install nni[SMAC]