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

image-quality / libsvm PyPi packages #400

Closed
dpori opened this issue Nov 19, 2020 · 4 comments
Closed

image-quality / libsvm PyPi packages #400

dpori opened this issue Nov 19, 2020 · 4 comments
Labels

Comments

@dpori
Copy link

dpori commented Nov 19, 2020

Hello there @mhsmith

pip {
                install "torch==1.4.0"
                install "torchvision==0.5.0"
                install "numpy==1.18.1"
                install "Pillow==7.1.2"
//                install "pandas==1.0.3"
                install "pandas==0.25.3"
                install "tensorboardX==2.0"
                install "tqdm==4.46.0"
                install "sklearn==0.0"
                install "image-quality==1.2.5"
                install "scikit-image==0.16.2"
                install "scikit-learn==0.22.1"
                install "joblib==0.17.0"
            }
> Task :app:generateDebugPythonRequirements
Chaquopy: Installing for arm64-v8a
Looking in indexes: https://pypi.org/simple, https://chaquo.com/pypi-7.0
Collecting torch==1.4.0
  Using cached https://chaquo.com/pypi-7.0/torch/torch-1.4.0-2-cp38-cp38-android_21_arm64_v8a.whl
Collecting torchvision==0.5.0
  Using cached https://chaquo.com/pypi-7.0/torchvision/torchvision-0.5.0-1-cp38-cp38-android_21_arm64_v8a.whl
Collecting numpy==1.18.1
  Using cached https://files.pythonhosted.org/packages/40/de/0ea5092b8bfd2e3aa6fdbb2e499a9f9adf810992884d414defc1573dca3f/numpy-1.18.1.zip
Collecting Pillow==7.1.2
  Using cached https://chaquo.com/pypi-7.0/pillow/Pillow-7.1.2-0-cp38-cp38-android_21_arm64_v8a.whl
Collecting pandas==0.25.3
  Using cached https://chaquo.com/pypi-7.0/pandas/pandas-0.25.3-1-cp38-cp38-android_21_arm64_v8a.whl
Collecting tensorboardX==2.0
  Using cached https://files.pythonhosted.org/packages/35/f1/5843425495765c8c2dd0784a851a93ef204d314fc87bcc2bbb9f662a3ad1/tensorboardX-2.0-py2.py3-none-any.whl
Collecting tqdm==4.46.0
  Using cached https://files.pythonhosted.org/packages/c9/40/058b12e8ba10e35f89c9b1fdfc2d4c7f8c05947df2d5eb3c7b258019fda0/tqdm-4.46.0-py2.py3-none-any.whl
Collecting sklearn==0.0
Collecting image-quality==1.2.5
  Using cached https://files.pythonhosted.org/packages/e4/d0/a1f6aa176228c3d6b96acceefa3cde77e73e3c90b1eec18835432fa5da8a/image_quality-1.2.5-py3-none-any.whl
Collecting scikit-image==0.16.2
  Using cached https://chaquo.com/pypi-7.0/scikit-image/scikit_image-0.16.2-0-cp38-cp38-android_21_arm64_v8a.whl
Collecting scikit-learn==0.22.1
  Using cached https://chaquo.com/pypi-7.0/scikit-learn/scikit_learn-0.22.1-0-cp38-cp38-android_21_arm64_v8a.whl
Collecting joblib==0.17.0
  Using cached https://files.pythonhosted.org/packages/fc/c9/f58220ac44a1592f79a343caba12f6837f9e0c04c196176a3d66338e1ea8/joblib-0.17.0-py3-none-any.whl
Collecting chaquopy-libcxx>=7000 (from torch==1.4.0)
  Using cached https://chaquo.com/pypi-7.0/chaquopy-libcxx/chaquopy_libcxx-7000-2-py3-none-android_21_arm64_v8a.whl
Collecting chaquopy-libgfortran>=4.9 (from torch==1.4.0)
  Using cached https://chaquo.com/pypi-7.0/chaquopy-libgfortran/chaquopy_libgfortran-4.9-0-py3-none-android_21_arm64_v8a.whl
Collecting chaquopy-openblas>=0.2.20 (from torch==1.4.0)
  Using cached https://chaquo.com/pypi-7.0/chaquopy-openblas/chaquopy_openblas-0.2.20-5-py3-none-android_21_arm64_v8a.whl
Collecting six (from torchvision==0.5.0)
  Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting chaquopy-freetype>=2.9.1 (from Pillow==7.1.2)
  Using cached https://chaquo.com/pypi-7.0/chaquopy-freetype/chaquopy_freetype-2.9.1-1-py3-none-android_21_arm64_v8a.whl
Collecting chaquopy-libjpeg>=1.5.3 (from Pillow==7.1.2)
  Using cached https://chaquo.com/pypi-7.0/chaquopy-libjpeg/chaquopy_libjpeg-1.5.3-1-py3-none-android_21_arm64_v8a.whl
Collecting pytz>=2017.2 (from pandas==0.25.3)
  Using cached https://files.pythonhosted.org/packages/12/f8/ff09af6ff61a3efaad5f61ba5facdf17e7722c4393f7d8a66674d2dbd29f/pytz-2020.4-py2.py3-none-any.whl
Collecting python-dateutil>=2.6.1 (from pandas==0.25.3)
  Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl
Collecting protobuf>=3.8.0 (from tensorboardX==2.0)
  Using cached https://files.pythonhosted.org/packages/81/d4/a8a31a326ee60e295e5d7477d93d8f6ceee98246c1a7381afc817a91d893/protobuf-3.14.0-py2.py3-none-any.whl
Collecting scipy>=1.3.0 (from image-quality==1.2.5)
  Using version 1.4.1 (newest version is 1.5.4, but Chaquopy prefers native wheels)
  Using cached https://chaquo.com/pypi-7.0/scipy/scipy-1.4.1-0-cp38-cp38-android_21_arm64_v8a.whl
Collecting libsvm>=3.23.0 (from image-quality==1.2.5)
  Using cached https://files.pythonhosted.org/packages/4b/11/c7700d0cd3a21eef2d7d996256277fc640ccd4f84717c10228cb6c1567dc/libsvm-3.23.0.4.tar.gz
Collecting networkx>=2.0 (from scikit-image==0.16.2)
  Using cached https://files.pythonhosted.org/packages/9b/cd/dc52755d30ba41c60243235460961fc28022e5b6731f16c268667625baea/networkx-2.5-py3-none-any.whl
Collecting imageio>=2.3.0 (from scikit-image==0.16.2)
  Using cached https://files.pythonhosted.org/packages/6e/57/5d899fae74c1752f52869b613a8210a2480e1a69688e65df6cb26117d45d/imageio-2.9.0-py3-none-any.whl
Collecting PyWavelets>=0.4.0 (from scikit-image==0.16.2)
  Using cached https://chaquo.com/pypi-7.0/pywavelets/PyWavelets-1.1.1-0-cp38-cp38-android_21_arm64_v8a.whl
Collecting matplotlib!=3.0.0,>=2.0.0 (from scikit-image==0.16.2)
  Using version 3.1.2 (newest version is 3.3.3, but Chaquopy prefers native wheels)
  Using cached https://chaquo.com/pypi-7.0/matplotlib/matplotlib-3.1.2-1-cp38-cp38-android_21_arm64_v8a.whl
Collecting decorator>=4.3.0 (from networkx>=2.0->scikit-image==0.16.2)
  Using cached https://files.pythonhosted.org/packages/ed/1b/72a1821152d07cf1d8b6fce298aeb06a7eb90f4d6d41acec9861e7cc6df0/decorator-4.4.2-py2.py3-none-any.whl
Collecting chaquopy-libpng>=1.6.34 (from matplotlib!=3.0.0,>=2.0.0->scikit-image==0.16.2)
  Using cached https://chaquo.com/pypi-7.0/chaquopy-libpng/chaquopy_libpng-1.6.34-1-py3-none-android_21_arm64_v8a.whl
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib!=3.0.0,>=2.0.0->scikit-image==0.16.2)
  Using cached https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl
Collecting kiwisolver>=1.0.1 (from matplotlib!=3.0.0,>=2.0.0->scikit-image==0.16.2)
  Using version 1.1.0 (newest version is 1.3.1, but Chaquopy prefers native wheels)
  Using cached https://chaquo.com/pypi-7.0/kiwisolver/kiwisolver-1.1.0-1-cp38-cp38-android_21_arm64_v8a.whl
Collecting cycler>=0.10 (from matplotlib!=3.0.0,>=2.0.0->scikit-image==0.16.2)
  Using cached https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting setuptools (from kiwisolver>=1.0.1->matplotlib!=3.0.0,>=2.0.0->scikit-image==0.16.2)
  Using cached https://files.pythonhosted.org/packages/6d/38/c21ef5034684ffc0412deefbb07d66678332290c14bb5269c85145fbd55e/setuptools-50.3.2-py3-none-any.whl
Building wheels for collected packages: numpy, libsvm
  Running setup.py bdist_wheel for numpy: started
  Running setup.py bdist_wheel for numpy: finished with status 'error'
  Complete output from command /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -u -S -c "import setuptools, tokenize;__file__='/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-wheel-blpnyr0s --python-tag py3:
  Running from numpy source directory.
  Cythonizing sources
  Processing numpy/random/_bounded_integers.pxd.in
  Processing numpy/random/_philox.pyx
  Traceback (most recent call last):
    File "/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/numpy/tools/cythonize.py", line 61, in process_pyx
      from Cython.Compiler.Version import version as cython_version
  ModuleNotFoundError: No module named 'Cython'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/numpy/tools/cythonize.py", line 238, in <module>
      main()
    File "/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/numpy/tools/cythonize.py", line 234, in main
      find_process_files(root_dir)
    File "/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/numpy/tools/cythonize.py", line 225, in find_process_files
      process(root_dir, fromfile, tofile, function, hash_db)
    File "/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/numpy/tools/cythonize.py", line 191, in process
      processor_function(fromfile, tofile)
    File "/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/numpy/tools/cythonize.py", line 66, in process_pyx
      raise OSError('Cython needs to be installed in Python as a module')
  OSError: Cython needs to be installed in Python as a module
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/numpy/setup.py", line 488, in <module>
      setup_package()
    File "/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/numpy/setup.py", line 469, in setup_package
      generate_cython()
    File "/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/numpy/setup.py", line 275, in generate_cython
      raise RuntimeError("Running cythonize failed!")
  RuntimeError: Running cythonize failed!
  
  ----------------------------------------
  Running setup.py clean for numpy
  Complete output from command /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -u -S -c "import setuptools, tokenize;__file__='/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
  Running from numpy source directory.
  
  `setup.py clean` is not supported, use one of the following instead:
  
    - `git clean -xdf` (cleans all files)
    - `git clean -Xdf` (cleans all versioned files, doesn't touch
                        files that aren't checked into the git repo)
  
  Add `--force` to your command to use it anyway if you must (unsupported).
  
  
  ----------------------------------------
  Failed cleaning build dir for numpy
  Running setup.py bdist_wheel for libsvm: started
  Running setup.py bdist_wheel for libsvm: finished with status 'error'
  Complete output from command /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -u -S -c "import setuptools, tokenize;__file__='/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/libsvm/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-wheel-7rz8pwba --python-tag py3:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.14.6-x86_64-3.8
  creating build/lib.macosx-10.14.6-x86_64-3.8/libsvm
  copying libsvm/commonutil.py -> build/lib.macosx-10.14.6-x86_64-3.8/libsvm
  copying libsvm/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/libsvm
  copying libsvm/svmutil.py -> build/lib.macosx-10.14.6-x86_64-3.8/libsvm
  copying libsvm/svm.py -> build/lib.macosx-10.14.6-x86_64-3.8/libsvm
  Command "/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -u -S -c "import setuptools, tokenize;__file__='/private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/libsvm/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-wheel-7rz8pwba --python-tag py3" failed with error code 1 in /private/var/folders/9k/5d931mld3nl3dyhbzz6v_xvw0000gn/T/pip-install-_m5wys0t/libsvm/
  running egg_info
  writing libsvm.egg-info/PKG-INFO
  writing dependency_links to libsvm.egg-info/dependency_links.txt
  writing requirements to libsvm.egg-info/requires.txt
  writing top-level names to libsvm.egg-info/top_level.txt
  reading manifest file 'libsvm.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'libsvm.egg-info/SOURCES.txt'
  creating build/lib.macosx-10.14.6-x86_64-3.8/libsvm/bin
  creating build/lib.macosx-10.14.6-x86_64-3.8/libsvm/bin/windows
  copying libsvm/bin/windows/libsvm.dll -> build/lib.macosx-10.14.6-x86_64-3.8/libsvm/bin/windows
  running build_ext
  building 'libsvm' extension
  error: CCompiler.compile: Chaquopy cannot compile native code
  
  ----------------------------------------
  error: CCompiler.compile: Chaquopy cannot compile native code

ERROR: Failed to install libsvm>=3.23.0 from https://files.pythonhosted.org/packages/4b/11/c7700d0cd3a21eef2d7d996256277fc640ccd4f84717c10228cb6c1567dc/libsvm-3.23.0.4.tar.gz (from image-quality==1.2.5).
For assistance, please raise an issue at https://github.com/chaquo/chaquopy/issues.
Failed to install libsvm>=3.23.0 from https://files.pythonhosted.org/packages/4b/11/c7700d0cd3a21eef2d7d996256277fc640ccd4f84717c10228cb6c1567dc/libsvm-3.23.0.4.tar.gz (from image-quality==1.2.5).

Chaquopy: Exit status 1

> Task :app:generateDebugPythonRequirements FAILED

Execution failed for task ':app:generateDebugPythonRequirements'.
> Process 'command 'python3'' finished with non-zero exit value 1

It seems like libsvm can't compile. Any guide on how to make it Chaquopy compatible?

@mhsmith
Copy link
Member

mhsmith commented Nov 20, 2020

Thanks for the report. This package isn't currently a priority, but if anyone else wants it too, please click the thumbs-up button above and subscribe to this issue.

@dpori
Copy link
Author

dpori commented Nov 20, 2020

Is there any tutorial on how to make some libraries Chaquopy compatible? Or any original package github you converted; so I can analyze the diff and try to do the same ? @mhsmith

@mhsmith
Copy link
Member

mhsmith commented Nov 20, 2020

If you want to build Python libraries containing native code, then you can license our package build tool, which was used to build everything in our native package repository. For more details, see #175 (comment).

@dpori
Copy link
Author

dpori commented Nov 24, 2020

Should be good; thank you @mhsmith

@dpori dpori closed this as completed Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants