I am trying to install rembg python library using chaquopy in android studio but the following error occurs:
ERROR: Could not find a version that satisfies the requirement onnxruntime~=1.13.1 (from rembg) (from versions: none) ERROR: No matching distribution found for onnxruntime~=1.13.1 (from rembg) Chaquopy: Exit status 1
- This is my build.gradle file details:
plugins {
id 'com.android.application'
id 'com.chaquo.python'
}
android {
namespace 'package.name'
compileSdk 33
defaultConfig {
applicationId "package.name"
minSdk 23
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
python {
pip {
install "rembg"
}
buildPython "C:/Users/Talha/AppData/Local/Programs/Python/Python38/python.exe"
}
sourceSets {
main {
python.srcDir "src/main/python"
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
This is gradle version: Gradle version details
using chaquo plugin:
id 'com.chaquo.python' version '13.0.0' apply false
I tried adding following install commands in pip tag:
pip {
install "onnxruntime==1.12.1"
install "rembg"
}
pip {
install "onnxruntime==1.11.1"
install "rembg"
}
pip {
install "onnxruntime==1.10.1"
install "rembg"
}
None of this success. I installed rembg from cmd it installed successfully and i have tested my code now i want to use in android studio and facing this issue