biolab / orange3

🍊 :bar_chart: :bulb: Orange: Interactive data analysis
https://orangedatamining.com
Other
4.85k stars 1.01k forks source link

orange unusable with Python 3.10 (with conda) #5748

Closed hotwa closed 2 years ago

hotwa commented 2 years ago

What's wrong?

>>> python -m Orange.canvas -l 2 --no-splash --no-welcome
Traceback (most recent call last):
  File "C:\tools\Anaconda3\envs\orange3\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\tools\Anaconda3\envs\orange3\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\tools\Anaconda3\envs\orange3\lib\site-packages\Orange\canvas\__main__.py", line 437, in <module>
    sys.exit(main())
  File "C:\tools\Anaconda3\envs\orange3\lib\site-packages\Orange\canvas\__main__.py", line 433, in main
    return OMain().run(argv)
  File "C:\tools\Anaconda3\envs\orange3\lib\site-packages\Orange\canvas\__main__.py", line 356, in run
    super().run(argv)
  File "C:\tools\Anaconda3\envs\orange3\lib\site-packages\orangecanvas\main.py", line 216, in run
    mainwindow = self.setup_main_window()
  File "C:\tools\Anaconda3\envs\orange3\lib\site-packages\orangecanvas\main.py", line 295, in setup_main_window
    self.window = window = self.create_main_window()
  File "C:\tools\Anaconda3\envs\orange3\lib\site-packages\Orange\canvas\__main__.py", line 417, in create_main_window
    window = MainWindow()
  File "C:\tools\Anaconda3\envs\orange3\lib\site-packages\Orange\canvas\mainwindow.py", line 108, in __init__
    super().__init__(*args, **kwargs)
  File "C:\tools\Anaconda3\envs\orange3\lib\site-packages\orangewidget\workflow\mainwindow.py", line 54, in __init__
    super().__init__(*args, **kwargs)
  File "C:\tools\Anaconda3\envs\orange3\lib\site-packages\orangecanvas\application\canvasmain.py", line 190, in __init__
    self.setup_actions()
  File "C:\tools\Anaconda3\envs\orange3\lib\site-packages\orangecanvas\application\canvasmain.py", line 423, in setup_actions
    QKeySequence(Qt.ControlModifier | Qt.AltModifier | Qt.Key_O)
TypeError: unable to convert a Python 'KeyboardModifiers' object to a C++ 'Qt::KeyboardModifiers' instance

How can we reproduce the problem?

use orange-canvas --version command line, a slash ico in screen.

What's your environment?

hotwa commented 2 years ago
conda create python=3.9 --yes --name myorange3
conda install -c conda-forge orange3

use command line 'orange-canvas' output is:

C:\tools\Anaconda3\envs\myorange3\lib\site-packages\Orange\widgets\data\owpythonscript.py:538: UserWarning: register 'summarize' function for type object. To silence this warning, set auto_summary of 'Object' to False.
  object = MultiInput(
C:\tools\Anaconda3\envs\myorange3\lib\site-packages\Orange\widgets\data\owpythonscript.py:542: UserWarning: register 'summarize' function for type object. To silence this warning, set auto_summary of 'Object' to False.
  class Outputs:

verything looks like OK when python == 3.9.9

markotoplak commented 2 years ago

Thanks. Yes, there are problems with Python 3.10 and PyQt 5.12. I guess we better remove orange for python 3.10 from conda-forge.

markotoplak commented 2 years ago

Without conda, there are more problems. bottleneck can not be compiled without manually patching it, see pydata/bottleneck#378

markotoplak commented 2 years ago

I was able to make Orange semi-working with a pip-based environment and a manually compiled fixed bottleneck version. The error shown here appears with PyQt5==5.14 and disappears with PyQt5=5.15. Conda is stuck on 5.12 for the time being though, but even if we workaround that error, Orange won't work with Python 3.10 just yet.

There are other issues. Tests do not pass due to various implicit int casting issues that were not fixed yet. Most seem trivial to fix though.

markotoplak commented 2 years ago

For now, offending packages were removed. We are working towards supporting Python 3.10: with #5751 tests pass.