Open swchen7 opened 1 week ago
build log:
Installing collected packages: chaquopy-libjpeg, chaquopy-freetype, pillow, numpy, typing-extensions, MarkupSafe, jinja2, mpmath, sympy, filelock, networkx, fsspec, torch, torchvision, protobuf, onnx, pyclipper, opencv-python, Polygon3, psutil, multidict, attrs, idna, yarl, frozenlist, async-timeout, aiosignal, aiohttp, intel-openmp, tbb, mkl, flatbuffers, humanfriendly, coloredlogs, packaging, onnxruntime, tqdm, chaquopy-libcxx, contourpy, cycler, chaquopy-libpng, kiwisolver, fonttools, pyparsing, six, python-dateutil, matplotlib, pytz, pandas, seaborn, ultralytics-thop, pyyaml, py-cpuinfo, chaquopy-libgfortran, chaquopy-openblas, scipy, urllib3, charset-normalizer, certifi, requests, ultralytics, setuptools, lightning-utilities, torchmetrics, pytorch-lightning, unidecode, chaquopy-geos, shapely, click, huggingface-hub, cnstd, setproctitle, docker-pycreds, platformdirs, sentry-sdk, smmap, gitdb, gitpython, wandb, cnocr, colorama, zipp, importlib-resources, pyreadline3
Successfully installed MarkupSafe-2.1.5 Polygon3-3.0.9.1 aiohttp-3.9.5 aiosignal-1.3.1 async-timeout-4.0.3 attrs-23.2.0 certifi-2024.6.2 chaquopy-freetype-2.9.1 chaquopy-geos-3.8.1 chaquopy-libcxx-11000 chaquopy-libgfortran-4.9 chaquopy-libjpeg-1.5.3 chaquopy-libpng-1.6.34 chaquopy-openblas-0.2.20 charset-normalizer-3.3.2 click-8.1.7 cnocr-2.3.0.3 cnstd-1.2.4.2 colorama-0.4.6 coloredlogs-15.0.1 contourpy-1.0.5 cycler-0.12.1 docker-pycreds-0.4.0 filelock-3.15.4 flatbuffers-24.3.25 fonttools-4.53.0 frozenlist-1.4.1 fsspec-2024.6.1 gitdb-4.0.11 gitpython-3.1.43 huggingface-hub-0.23.4 humanfriendly-10.0 idna-3.7 importlib-resources-6.4.0 intel-openmp-2021.4.0 jinja2-3.1.4 kiwisolver-1.4.5 lightning-utilities-0.11.3.post0 matplotlib-3.6.0 mkl-2021.4.0 mpmath-1.3.0 multidict-6.0.5 networkx-3.2.1 numpy-1.24.4 onnx-1.16.1 onnxruntime-1.18.0 opencv-python-4.10.0.84 packaging-24.1 pandas-1.5.0 pillow-9.2.0 platformdirs-4.2.2 protobuf-5.27.2 psutil-6.0.0 py-cpuinfo-9.0.0 pyclipper-1.3.0.post5 pyparsing-3.1.2 pyreadline3-3.4.1 python-dateutil-2.9.0.post0 pytorch-lightning-2.3.1 pytz-2024.1 pyyaml-6.0.1 requests-2.32.3 scipy-1.8.1 seaborn-0.13.2 sentry-sdk-2.7.1 setproctitle-1.3.3 setuptools-70.1.1 shapely-1.8.5 six-1.16.0 smmap-5.0.1 sympy-1.12.1 tbb-2021.13.0 torch-2.3.1 torchmetrics-1.4.0.post0 torchvision-0.18.1+cpu tqdm-4.66.4 typing-extensions-4.12.2 ultralytics-8.2.45 ultralytics-thop-2.0.0 unidecode-1.3.8 urllib3-2.2.2 wandb-0.17.3 yarl-1.9.4 zipp-3.19.2
Chaquopy: Failed to process C:\Users\swchen7-c\AndroidStudioProjects\TCCMatrixApp\app\build\python\pip\debug\arm64-v8a\torchvision-0.18.1+cpu.dist-info
Traceback (most recent call last):
File "C:\Users\swchen7-c\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\swchen7-c\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\swchen7-c\AndroidStudioProjects\TCCMatrixApp\app\build\python\env\debug\lib\site-packages\chaquopy\pip_install.py", line 362, in
Task :app:generateDebugPythonRequirements FAILED Execution failed for task ':app:generateDebugPythonRequirements'. Process 'command 'C:\Users\swchen7-c\AndroidStudioProjects\TCCMatrixApp\app\build\python\env\debug\Scripts\python.exe'' finished with non-zero exit value 1
Windows wheels will not work on Android. The only Android wheels that are currently available for Torchvision are those in our repository. To use them, you'll need to change your Python version from 3.9 to 3.8.
In other words, replace your entire chaquopy
block with this:
chaquopy {
defaultConfig {
buildPython("C:/Users/swchen7-c/Python39/Python.exe")
version = "3.8"
pip {
options ("--extra-index-url", "https://pypi.tuna.tsinghua.edu.cn/simple/")
install("torchvision")
install("-r", "requirements.txt")
}
}
}
Our current latest torchvision version is 0.9.1. If you need a newer version, see #758.
Some of the other packages you attempted to install are unavailable, such as onnx (#216). Please search this issue tracker for more information.
Chaquopy version : 15.0.1
Relevant parts of your build.gradle file
Describe your issue
I installed torchvision by .whl but don't know why there is a problem says that failed to process, but it was installed successfully. Because Chaquopy can not run native code and could not find torchvision== 0.18.1 so i use whl method