intel / openvino-ai-plugins-gimp

GIMP AI plugins with OpenVINO Backend
Apache License 2.0
507 stars 55 forks source link

Which python version should I use? #51

Closed CesMak closed 11 months ago

CesMak commented 1 year ago

It seems that I have this issue: https://github.com/scikit-learn/scikit-learn/discussions/26910

During installation under Linux I get:

Collecting scikit-learn~=0.24.1 (from openvino-dev==2022.2.0->-r model-requirements.txt (line 2))
  Using cached scikit-learn-0.24.2.tar.gz (7.5 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [794 lines of output]
      <string>:17: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      Partial import of sklearn during the build process.
      <string>:116: DeprecationWarning:

        `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
        of the deprecation of `distutils` itself. It will be removed for
        Python >= 3.12. For older Python versions it will remain present.
        It is recommended to use `setuptools < 60.0` for those Python versions.
        For more details, see:
          https://numpy.org/devdocs/reference/distutils_status_migration.html

      INFO: C compiler: x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC

      INFO: compile options: '-c'
      INFO: x86_64-linux-gnu-gcc: test_program.c
      INFO: x86_64-linux-gnu-gcc objects/test_program.o -o test_program
      INFO: C compiler: x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC

..... 
 [53/53] Cythonizing sklearn/utils/sparsefuncs_fast.pyx
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/markus/Desktop/openvino-ai-plugins-gimp/gimpenv3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/tmp/pip-build-env-cxoufayp/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 396, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-cxoufayp/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-cxoufayp/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 301, in <module>
        File "<string>", line 297, in setup_package
        File "/tmp/pip-build-env-cxoufayp/overlay/lib/python3.10/site-packages/numpy/distutils/core.py", line 135, in setup
          config = configuration()
        File "<string>", line 188, in configuration
        File "/tmp/pip-build-env-cxoufayp/overlay/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 1050, in add_subpackage
          config_list = self.get_subpackage(subpackage_name, subpackage_path,
        File "/tmp/pip-build-env-cxoufayp/overlay/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 1016, in get_subpackage
          config = self._get_configuration_from_setup_py(
        File "/tmp/pip-build-env-cxoufayp/overlay/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 958, in _get_configuration_from_setup_py
          config = setup_module.configuration(*args)
        File "/tmp/pip-install-u9f7vkll/scikit-learn_ff12cb9213f14ad4828ff980006f0eab/sklearn/setup.py", line 83, in configuration
          cythonize_extensions(top_path, config)
        File "/tmp/pip-install-u9f7vkll/scikit-learn_ff12cb9213f14ad4828ff980006f0eab/sklearn/_build_utils/__init__.py", line 70, in cythonize_extensions
          config.ext_modules = cythonize(
        File "/tmp/pip-build-env-cxoufayp/overlay/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1125, in cythonize
          result.get(99999)  # seconds
        File "/usr/lib/python3.10/multiprocessing/pool.py", line 774, in get
          raise self._value
      Cython.Compiler.Errors.CompileError: sklearn/ensemble/_hist_gradient_boosting/splitting.pyx
      [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.

Seems that the issue comes from: pip3 install openvino-dev==2022.2.0

I currently use: Python 3.10.12

I tried with python 3.9 but I got the same issue. any ideas which python version should I use?

any ideas?

gblong1 commented 11 months ago

Hi @CesMak - we have published an update which should resolve this issue. Python 3.10.XX should work fine. I have peronally used 3.10.11 for my systems. Please grab the latest code and let me know if you still run into problems.