0

I wanted to install auto sklearn package for Jupyter Notebook with

!pip install auto-sklearn

I tried it on Anaconda prompt too but didn't work and I faced an error which is discussed here. Citation:

I believe this is due to the recent release of Cython 3.0.0, which the package you’re installing apparently isn’t ready for. Try the following:

$ echo "Cython<3" > cython_constraint.txt

$PIP_CONSTRAINT=cython_constraint.txt pip install "ai-core-sdk[aicore-content]" 

Note that you need to set the constraint file via the environment variable so that it propagates to the build env.


I found the folder cython_constraint.txt on my PC and it contain the text "Cython<3". But I couldn't follow the above steps to fix the error. Can you please help me to solve the issue?

Note that I'm using Python 3.10.12.

Here is the error message,

Collecting auto-sklearn
  Using cached auto-sklearn-0.15.0.tar.gz (6.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "F:\Anaconda\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in <module>
          main()
        File "F:\Anaconda\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "F:\Anaconda\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\Soheyl\AppData\Local\Temp\pip-build-env-rp4c8hp_\overlay\Lib\site-packages\setuptools\build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "C:\Users\Soheyl\AppData\Local\Temp\pip-build-env-rp4c8hp_\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "C:\Users\Soheyl\AppData\Local\Temp\pip-build-env-rp4c8hp_\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "C:\Users\Soheyl\AppData\Local\Temp\pip-build-env-rp4c8hp_\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 10, in <module>
      ValueError: Detected unsupported operating system: win32. Please check the compability information of auto-sklearn: https://automl.github.io/auto-sklearn/master/installation.html#windows-osx-compatibility
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Etemon
  • 53
  • 2
  • 11

1 Answers1

1

According to the documentation auto-sklearn requires a Linux operating system. You can try to install SWIG, but I'm not sure that will make it work on Windows since Jupyter Notebook, being a Python environment, still operates within the constraints of the underlying operating system.

Alternatively you could use Google Colab instead of Jupyter Notebook, since apparently auto-sklearn should work there.

If you're attached to Jupyter Notebook (and not so attached to auto-sklearn), you could try using TPOT (Tree-based Pipeline Optimization Tool) to optimize your machine learning model automatically.

Ada
  • 427
  • 2
  • 13