biolab / orange3

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

Orange Not Loading at all in Windows #5654

Closed Killorito closed 3 years ago

Killorito commented 3 years ago

What's wrong?

I have installed Orange from the Orange website (the application, not pip). I have extracted the file, and I can see the execute of the file. However, every time I click on the file, it does not load. I made a new account on my windows 10 machine, and it could run on the new account. I have deleted orange from the main account and re-installed it, but it didn't work. I have searched for any remaining files of orange so that I may get the cleanest install possible, but it still does not work.

How can we reproduce the problem?

Unfortunately, I cannot tell you how to reproduce this as it just occurred on my system.

What's your environment?

ajdapretnar commented 3 years ago

Might I ask was it just the shortcut that didn't work? Did it work if you ran Orange from the start menu?

Killorito commented 3 years ago

@ajdapretnar , it really doesn't matter on the shortcut, because everything I try to do to make Orange start, doesn't. I have even restarted my laptop, and the shortcuts and execute files that are made by orange don't work on launching it.

ajdapretnar commented 3 years ago

Ok, could you maybe open Orange Command Prompt (it is a special program on Windows) and run python -m Orange.canvas -l 4 and post the output here?

Killorito commented 3 years ago

Hi @ajdapretnar , the output i get is:

Traceback (most recent call last):
  File "C:\Users\mghaf\AppData\Local\Programs\Orange\lib\runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "C:\Users\mghaf\AppData\Local\Programs\Orange\lib\runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "C:\Users\mghaf\AppData\Local\Programs\Orange\lib\site-packages\Orange\__init__.py", line 4, in <module>
    from Orange import data
  File "C:\Users\mghaf\AppData\Local\Programs\Orange\lib\site-packages\Orange\data\__init__.py", line 4, in <module>
    from .variable import *
  File "C:\Users\mghaf\AppData\Local\Programs\Orange\lib\site-packages\Orange\data\variable.py", line 10, in <module>
    import numpy as np
  File "C:\Users\mghaf\AppData\Roaming\Python\Python38\site-packages\numpy\__init__.py", line 148, in <module>
    from . import _distributor_init
  File "C:\Users\mghaf\AppData\Roaming\Python\Python38\site-packages\numpy\_distributor_init.py", line 26, in <module>
    WinDLL(os.path.abspath(filename))
  File "C:\Users\mghaf\AppData\Local\Programs\Orange\lib\ctypes\__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
Killorito commented 3 years ago

@ajdapretnar , also on a side note. I do not use Anaconda, but just made orange download miniconda for it to work. This is because I am using python that I downloaded myself.

ajdapretnar commented 3 years ago

My guess is you are using 32-bit Python, which doesn't work with Orange. You'll need 64-bit. But I didn't quite understand when did you download Miniconda. Was it for the new user or for the old one, but it still didn't work?

Killorito commented 3 years ago

@ajdapretnar Miniconda was downloaded when i was downloading Orange. However, I do have the 64-bit version:

Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

My guess is that there is something wrong with the initialization of orange. I have already re-installed and rebooted my laptop many times, but it does not work!

ales-erjavec commented 3 years ago
...
    from .variable import *
  File "C:\Users\mghaf\AppData\Local\Programs\Orange\lib\site-packages\Orange\data\variable.py", line 10, in <module>
    import numpy as np
  File "C:\Users\mghaf\AppData\Roaming\Python\Python38\site-packages\numpy\__init__.py", line 148, in <module>
    from . import _distributor_init
...

That seems suspicious. It's mixing environments from Orange local env and global Python38. Do you by any chance have PYTHONHOME or PYTHONPATH environment variable set? Run echo %PYTHONHOME% and echo %PYTHONPATH% in the Command Prompt and post the output.

Killorito commented 3 years ago

@ales-erjavec , the output for the echo %PYTHONHOME% is: %PYTHONHOME%. The output for echo %PYTHONPATH% is %PYTHONPATH%

Killorito commented 3 years ago

@ales-erjavec I was having Path issues before, and so i deleted any python instances in my path, and reinstalled all of python. I was using Anaconda back then, but i deleted everything from Anaconda and python (anything i could find in my folders i purged).

ales-erjavec commented 3 years ago

Can you try running python -s -S -m Orange.canvas -l 4

Killorito commented 3 years ago

@ales-erjavec Hello. I get (from:python -s -S -m Orange.canvas -l 4):

C:\Users\...\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe: Error while finding module specification for 'Orange.canvas' (ModuleNotFoundError: No module named 'Orange')

ales-erjavec commented 3 years ago

Sorry. Can you try running python -s -S -m Orange.canvas -l 4 from the Orange Command Prompt

Killorito commented 3 years ago

@ales-erjavec Yeah sure. Here is the response:

C:\Users\...\AppData\Local\Programs\Orange\python.exe: Error while finding module specification for 'Orange.canvas' (ModuleNotFoundError: No module named 'Orange')

ales-erjavec commented 3 years ago

Can you try again with just -s i.e. python -s -m Orange.canvas -l 4

Killorito commented 3 years ago

@ales-erjavec Wow, it worked!! It launched Orange!

How did it do that though?