biolab / orange3-example-addon

Example Addon for Orange3
53 stars 48 forks source link

Installation does not work with python 3.11.1 #16

Open stefaneidelloth opened 1 year ago

stefaneidelloth commented 1 year ago

I cloned the project and tried to install it with

pip install .

Building wheels for collected packages: Orange3-Example-Add-on 
  Building wheel for Orange3-Example-Add-on (setup.py) ... done 
  WARNING: Legacy build of wheel for 'Orange3-Example-Add-on' created no files.
  Command arguments: 'C:\python_env\App\WinPython\python-3.11.1.amd64\python.exe' -u -c '
  exec(compile('"'"''"'"''"'"'
  # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
  #
  # - It imports setuptools before invoking setup.py, to enable projects that directly
  #   import from `distutils.core` to work with newer packaging standards.
  # - It provides a clear error message when setuptools is not installed.
  # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
  #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
  #     manifest_maker: standard file '"'"'-c'"'"' not found".
  # - It generates a shim setup.py, for handling setup.cfg-only projects.
  import os, sys, tokenize

  try:
      import setuptools
  except ImportError as error:
      print(
          "ERROR: Can not execute `setup.py` since setuptools is not available in "
  if os.path.exists(__file__):
      filename = __file__
      with tokenize.open(__file__) as f:
          setup_py_code = f.read()
  else:
      filename = "<auto-generated setuptools caller>"
      setup_py_code = "from setuptools import setup; setup()"

  exec(compile(setup_py_code, filename, "exec"))
  '"'"''"'"''"'"' % ('"'"'C:\\python_env\\workspace\\orange3-addon\\setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d 'C:\Users\eis\AppData\Local\Temp\PyChar
mPortableTemp\pip-wheel-lnv961se'
  Command output: [use --verbose to show]
  Running setup.py clean for Orange3-Example-Add-on
Failed to build Orange3-Example-Add-on
ERROR: Could not build wheels for Orange3-Example-Add-on, which is required to install pyproject.toml-based projects
dddping commented 1 year ago

try 'pip install -e .'. I have the same error when I use 'pip install .'

WoifeG commented 3 months ago

So, I'm getting the same error with python 3.9 on win10 Or to be more precise, I'm trying to install our own local addon (which was based on your example-addon) to the portable version Orange3-3.36.2 While the same procedure worked for version 3.34, 3.36 seems to have problems building the addon.

As suggested by @dddping installing the addon in editable mode works just fine, but doesn't allow the project to be used as portable any longer obviously.

Any help would be appreciated, thank you!

WoifeG commented 3 months ago

I may have found the problem for my error. The documentation was not build successfully prior to installing the addon.

When running pip install <addon> --verbose, I've found the following entry: Directory 'C:\appl\orange\orange3-voestalpine\doc\_build\html' does not exist. Please build documentation before running bdist_wheel.

After fixing my documentation and rebuilding it with sphinx, the installation worked smoothly.

markotoplak commented 3 months ago

So just building the docs fixed this? That is a naughty little install script then.