chaquo / chaquopy

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

error in downloading the sklearn #1164

Closed Ahmedmohamy closed 2 weeks ago

Ahmedmohamy commented 1 month ago

Chaquopy version

15.0.1

Relevant parts of your build.gradle file

import com.chaquo.python.BUILD_PYTHON_ADVICE
import com.chaquo.python.PythonPlugin
import com.chaquo.python.pythonVersionInfo

plugins {
    id("com.android.application")
    id("com.google.gms.google-services")
    id("com.chaquo.python")
}

android {
    namespace = "com.example.chatbot"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.example.chatbot"
        minSdk = 26
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"
        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

        ndk {
            // On Apple silicon, you can omit x86_64.
            abiFilters += listOf("arm64-v8a", "x86_64")
        }
    }

    buildTypes {
        release {
            isMinifyEnabled = 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.1")
        implementation("com.google.android.material:material:1.11.0")
        implementation("androidx.constraintlayout:constraintlayout:2.1.4")
        implementation("com.google.firebase:firebase-auth:23.0.0")
        testImplementation("junit:junit:4.13.2")
        androidTestImplementation("androidx.test.ext:junit:1.1.5")
        androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
    }
}

chaquopy {
    productFlavors { }
    sourceSets { }

    defaultConfig {
        version = "3.12"
        buildPython("C:/Program Files/Python312/python.exe")
            pip{
                install("pandas")
                install("numpy")
                install("fuzzywuzzy")
                install("scikit-learn==1.0.2")
            }

    }

    sourceSets.getByName("main") {
        setSrcDirs(listOf("src/main/python"))
    }

}

Describe your issue

please help me as there are always errors when downloading the sklean library i tried alot of things and i dont know what to do now

mhsmith commented 4 weeks ago

We only support certain combinations of Python version and scikit-learn version – see the repository for a full list. "cp" indicates the Python version, so you'll have change the version setting to reduce your app's Python version to 3.10 or older.

Ahmedmohamy commented 4 weeks ago

Yes i changed the version to 3.8 but there are still alot of problems regarding errors in the python script in android studio and its connection and stuff in the libraries and i dont know what to do

mhsmith commented 3 weeks ago

Please read my previous comment again carefully. You'll need to change not only the Python version, but also the scikit-learn version.

If you still need help after that, please post your current chaquopy section, and the full build log.

Ahmedmohamy commented 3 weeks ago

If i sent you my codes, can you help me?

Get Outlook for iOShttps://aka.ms/o0ukef


From: Malcolm Smith @.> Sent: Monday, June 3, 2024 4:16:11 AM To: chaquo/chaquopy @.> Cc: Ahmedmohamy @.>; Author @.> Subject: Re: [chaquo/chaquopy] error in downloading the sklearn (Issue #1164)

Please read my previous comment again carefully. You'll need to change not only the Python version, but also the scikit-learn version.

If you still need help after that, please post your current chaquopy section, and the full build log.

— Reply to this email directly, view it on GitHubhttps://github.com/chaquo/chaquopy/issues/1164#issuecomment-2144110373, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIYWVVJWWYMTYBU6HPJKKH3ZFO7VXAVCNFSM6AAAAABIMJZDBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBUGEYTAMZXGM. You are receiving this because you authored the thread.Message ID: @.***>

mhsmith commented 3 weeks ago

Please try to solve the problem yourself first, and if you still need help, post the things I mentioned on the GitHub issue.

Ahmedmohamy commented 3 weeks ago

I have spent weeks trying to but there is something in the logic that doesnt add up

Get Outlook for iOShttps://aka.ms/o0ukef


From: Malcolm Smith @.> Sent: Monday, June 3, 2024 4:24:20 AM To: chaquo/chaquopy @.> Cc: Ahmedmohamy @.>; Author @.> Subject: Re: [chaquo/chaquopy] error in downloading the sklearn (Issue #1164)

Please try to solve the problem yourself first, and if you still need help, post the things I mentioned on the GitHub issue.

— Reply to this email directly, view it on GitHubhttps://github.com/chaquo/chaquopy/issues/1164#issuecomment-2144116282, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIYWVVPYYS2VBUOUVOC4IHTZFPAUJAVCNFSM6AAAAABIMJZDBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBUGEYTMMRYGI. You are receiving this because you authored the thread.Message ID: @.***>

mhsmith commented 3 weeks ago

OK, but I can't do anything about vague comments like that. If you still need help, please post your current chaquopy section, and the full build log.