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

Could not find a version that satisfies the requirement google-generativeai>=0.8.2 (from versions: 0.1.0rc1, 0.1.0rc2) #1309

Closed
Thejas775 opened this issue Dec 12, 2024 · 9 comments

Comments

@Thejas775
Copy link

Chaquopy version

16.0.0

Relevant parts of your build.gradle file

python {
// buildPython "C:\Users\utsav\AppData\Local\Programs\Python\Python311\python.exe"
buildPython "python3.10"
}
python {
pip {
install "numpy"
install "pillow"
install "requests"
install "urllib3==1.25.4"
install "boto3==1.34.65"
install "google-generativeai>=0.8.2"
}
}
}

Describe your issue

The google generative ai library needs to be updaed

@mhsmith
Copy link
Member

mhsmith commented Dec 13, 2024

The current versions of this package require at least Python 3.9. You can set your app's Python version as shown in the documentation.

To work around #1017, you'll also have to add the following line:

install "pydantic<2"

@Thejas775
Copy link
Author

The problem is Gemini is having trouble with python version less than 3.10

@mhsmith
Copy link
Member

mhsmith commented Dec 13, 2024

I said "at least Python 3.9", so 3.10 should also be fine.

@Thejas775
Copy link
Author

Thejas775 commented Dec 14, 2024

        python {
//            buildPython  "C:\\Users\\utsav\\AppData\\Local\\Programs\\Python\\Python311\\python.exe"
            buildPython "python3.10"
        }
        python {
            pip {
                install "numpy"
                install "pillow"
                install "requests"
                install "urllib3==1.25.4"
                install "boto3==1.34.65"
                install "google-generativeai>=0.8.2"
                install "pydantic<2"
//                install "together"
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    sourceSets {
        main {
            python.srcDir "python3.10"
        }
    }

@Thejas775
Copy link
Author

Thejas775 commented Dec 14, 2024

@mhsmith still doesnt-'t work

@mhsmith
Copy link
Member

mhsmith commented Dec 16, 2024

You still haven't changed the Python version of your app. Follow the instructions in my previous comment.

@Thejas775
Copy link
Author

You still haven't changed the Python version of your app. Follow the instructions in my previous comment.

chaquopy {
defaultConfig {
version = "3.9"
}
}

Package 'numpy' requires a different Python: 3.8.10 not in '>=3.9'

@mhsmith
Copy link
Member

mhsmith commented Dec 17, 2024

See #1295 (comment).

@Thejas775
Copy link
Author

install "google-generativeai>=0.8.2"
install "pydantic<2"

Thank you it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants