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

How can i add the rpds-py into app? #1192

Open
HoYoUp opened this issue Apr 3, 2024 · 7 comments
Open

How can i add the rpds-py into app? #1192

HoYoUp opened this issue Apr 3, 2024 · 7 comments
Labels

Comments

@HoYoUp
Copy link

HoYoUp commented Apr 3, 2024

My Status
Android Studio 3.6.2 , Python 3.8.2 , Gradle 5.6.4-all

classpath 'com.android.tools.build:gradle:3.6.1'
classpath "com.chaquo.python:gradle:10.0.1"

The app will runs on the phone with armeabi-v7a ,

 buildPython "F:/python/python38/python.exe"
            pip {
                options "--index-url", "https://chaquo.com/pypi-7.0"  // Disable
                options "--extra-index-url", "https://pypi.org/simple"

                install "matplotlib==3.1.2"
                install "elasticsearch"
                install "backtrader"
               // install "h5py"  // For Keras model files.
                install "json-rpc"
                install "numpy==1.19.5"
                //install "opencv-python"
                install "pandas==1.3.2"
                install "pillow==8.4.0"  // For image files.
                install "notebook==4.0.0"
                install "scipy"
                install "six"
                install "jupyter-server==2.4.0"
                install "pyzmq==18.1.1"
                //install "rpds-py==0.3.0"
                //install "tensorflow"

Error:

Collecting rpds-py>=0.7.1 (from jsonschema>=2.6->nbformat->notebook==4.0.0)
  Using cached https://files.pythonhosted.org/packages/55/ba/ce7b9f0fc5323f20ffdf85f682e51bee8dc03e9b54503939ebb63d1d0d5e/rpds_py-0.18.0.tar.gz
ERROR: Disabling PEP 517 processing is invalid: project does not have a setup.py
Chaquopy: Exit status 1

> Task :app:generateDebugPythonRequirements FAILED

FAILURE: Build failed with an exception.

How can i do?

@mhsmith
Copy link
Member

mhsmith commented Apr 3, 2024

This particular error is fixed in the current version of Chaquopy -- change the version of com.chaquo.python:gradle to 15.0.1.

However, rpds-py still fails to install because it depends on Rust (#1030). You can work around this by using the minimum version of jsonschema:

install "jsonschema==2.6"

Some later versions will probably also work -- I don't know exactly when they added the rpds-py requirement.

@HoYoUp
Copy link
Author

HoYoUp commented Apr 3, 2024

Thank you ,I tried the second , it still has same error , options like this:
install "jsonschema==2.6"
install "notebook==7.1.0"//4.0.0
I will try to find other solution.

@mhsmith
Copy link
Member

mhsmith commented Apr 3, 2024

Thank you ,I tried the second

You should upgrade Chaquopy regardless, because the current version has many fixes in this area.

@Yemaoxin
Copy link

Yemaoxin commented Jul 1, 2024

I have the same problem.

My chaquopy version:
id 'com.chaquo.python' version '15.0.1' apply false

jsonschema==2.6
install Failed

@mhsmith mhsmith transferred this issue from chaquo/chaquopy-jupyter Jul 1, 2024
@mhsmith
Copy link
Member

mhsmith commented Jul 1, 2024

@Yemaoxin: Please post:

  • The python or chaquopy sections of your build.gradle file.
  • The full build log: you can display it by clicking the “Build: failed” caption to the left of the error message.

@mhsmith
Copy link
Member

mhsmith commented Jul 2, 2024

Originally posted by @Yemaoxin in #1193


package:
  name: rpds_py
  version: "0.18.1"

python3.8 ./build-wheel.py --python 3.8 --abi x86_64 rpds-py

When I want to build notebook in Chaquopy, it stop at install rpds-py.
When I want to build whl for rdps-py , build-wheel: Error: /home/ymx/chaquopy-15.0.1/server/pypi/packages/rpds-py/build/0.18.1/cp38-cp38-android_21_x86_64/fix_wheel/rpds/rpds.so is linked against unknown library 'libgcc_s.so.1'.

@mhsmith
Copy link
Member

mhsmith commented Jul 2, 2024

rpds-py can't currently be built as a whl either, because it depends on Rust (#1030). But it should be possible to avoid the rpds-py dependency by installing jsonschema==2.6, which has a pure-Python wheel on PyPI with no dependencies at all.

If that still doesn't work, please post the things I mentioned in my previous comment.

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

3 participants