Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"orange-canvas" command fails with import error in Orange 3 #6843

Closed
qingfengwuhen opened this issue Jun 27, 2024 · 2 comments
Closed

"orange-canvas" command fails with import error in Orange 3 #6843

qingfengwuhen opened this issue Jun 27, 2024 · 2 comments
Labels
bug report Bug is reported by user, not yet confirmed by the core team

Comments

@qingfengwuhen
Copy link

When attempting to run the "orange-canvas" command, I encountered an import error in Python that prevented me from running the app.

D:\Users\xxxxxxx\AppData\Local\anaconda3\envs\orange3_dev\python.exe F:/project/orange3/Orange/canvas/main.py
F:\project\orange3\Orange\canvas_main_.py:19: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
Traceback (most recent call last):
File "F:\project\orange3\Orange\canvas_main_.py", line 35, in
from Orange import canvas
File "F:\project\orange3\Orange_init_.py", line 4, in
from Orange import data
File "F:\project\orange3\Orange\data_init_.py", line 4, in
from .variable import *
File "F:\project\orange3\Orange\data\variable.py", line 15, in
from Orange.data import _variable
ImportError: cannot import name 'variable' from partially initialized module 'Orange.data' (most likely due to a circular import) (F:\project\orange3\Orange\data_init.py)

What's your environment?

  • Operating system: windows 10
  • Orange version: 3.37
  • How you installed Orange: git clone then pip install -e orange3
@qingfengwuhen qingfengwuhen added the bug report Bug is reported by user, not yet confirmed by the core team label Jun 27, 2024
@janezd
Copy link
Contributor

janezd commented Jun 27, 2024

This is probably not a problem with Orange (and probably can't be resolved in Orange) but rather with something peculiar in your setup or the way you run Orange.

From which directory do you run orange-canvas? Can you cd to a completely unrelated directory? I cannot replicate your exact problem, but Python searches for modules in the current directory first, which can lead to problems.

Does python -m Orange.canvas work?

@janezd
Copy link
Contributor

janezd commented Aug 23, 2024

Closed due to inactivity.

@janezd janezd closed this as completed Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Bug is reported by user, not yet confirmed by the core team
Projects
None yet
Development

No branches or pull requests

2 participants