chaquo / chaquopy

Chaquopy: the Python SDK for Android
https://chaquo.com/chaquopy/
MIT License
849 stars 133 forks source link

opencv-python for Python 3.9 or later #779

Open saka3324 opened 1 year ago

saka3324 commented 1 year ago

II got this error when I tried to install opencv-python-4.5.1.48 with python 3.10.

ERROR: Command errored out with exit status 1:
     command: 'C:\Users\user\AppData\Local\Programs\Python\Python310\python.exe' -S -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-pbvea6hg\\opencv-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-pbvea6hg\\opencv-python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' --no-user-cfg egg_info --egg-base pip-egg-info
         cwd: C:\Users\user\AppData\Local\Temp\pip-install-pbvea6hg\opencv-python\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\user\AppData\Local\Temp\pip-install-pbvea6hg\opencv-python\setup.py", line 10, in <module>
        import skbuild
    ModuleNotFoundError: No module named 'skbuild'
    ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    ERROR: Command errored out with exit status 1:

    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

ERROR: Failed to install opencv-python==4.5.1.48 from https://files.pythonhosted.org/packages/bb/08/9dbc183a3ac6baa95fabf749ddb531bd26256edfff5b6c2195eca26258e9/opencv-python-4.5.1.48.tar.gz.
For assistance, please raise an issue at https://github.com/chaquo/chaquopy/issues.
Chaquopy: Exit status 1
Failed to install opencv-python==4.5.1.48 from https://files.pythonhosted.org/packages/bb/08/9dbc183a3ac6baa95fabf749ddb531bd26256edfff5b6c2195eca26258e9/opencv-python-4.5.1.48.tar.gz.

I have confirmed that scikit-build is in pip.

scikit-build 0.16.6

Is it because opencv.whl published in chaquopy does not support Python3.10? (cp38) I also tried build-wheel, but the output was only for cp38 and it didn't work.
Is there any way to output it for python 3.10?

Thank you.

mhsmith commented 1 year ago

We'll update the build-wheel tool to support Python 3.10 in the next few days. To be notified, please subscribe to https://github.com/chaquo/chaquopy/issues/805.

mhsmith commented 1 year ago

This package is currently only available for Python 3.8. You can set your app’s Python version by following the instructions here. If switching to Python 3.8 doesn't work for you, please post a comment explaining why.

If anyone else needs this package for Python 3.9 or later, please click the thumbs up button above, and subscribe to this issue to receive updates.

You may also try building the package yourself by following the instructions here.