Skip to content

Can't connect to HTTPS URL because the SSL module is not available #450

@mimong2

Description

@mimong2

I am trying to install an external module using pip

gradle code:
apply plugin: 'com.android.application'
apply plugin: 'com.chaquo.python'

android {
compileSdkVersion 30
buildToolsVersion "29.0.3"

defaultConfig {
    applicationId "com.chaquo.python.hello"
    minSdkVersion 16
    targetSdkVersion 30
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

    python {
        // If Chaquopy fails to find Python on your build machine, enable the following
        // line and edit it to point to Python 3.5 or later.
        // buildPython "C:/Python36/python.exe"
        pip{
            install "requests"
        }
        staticProxy "hello"
    }
    ndk {
        abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
    }

}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

}

Here is the error:

**> Task :app:generateDebugPythonRequirements
C:\Users\user\Downloads\chaquopy-hello-master\chaquopy-hello-master\app\build\generated\python\bp.zip\pip_vendor\ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
C:\Users\user\Downloads\chaquopy-hello-master\chaquopy-hello-master\app\build\generated\python\bp.zip\pip_vendor\ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
Chaquopy: Installing for arm64-v8a
C:\Users\user\Downloads\chaquopy-hello-master\chaquopy-hello-master\app\build\generated\python\bp.zip\pip_vendor\ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
C:\Users\user\Downloads\chaquopy-hello-master\chaquopy-hello-master\app\build\generated\python\bp.zip\pip_vendor\ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Looking in indexes: https://pypi.org/simple, https://chaquo.com/pypi-7.0
Collecting requests
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/requests/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/requests/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/requests/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/requests/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/requests/
Could not fetch URL https://pypi.org/simple/requests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/requests/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi-7.0/requests/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi-7.0/requests/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi-7.0/requests/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi-7.0/requests/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi-7.0/requests/
Could not fetch URL https://chaquo.com/pypi-7.0/requests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='chaquo.com', port=443): Max retries exceeded with url: /pypi-7.0/requests/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Could not find a version that satisfies the requirement requests (from versions: )
No matching distribution found for requests
Chaquopy: Exit status 1

Task :app:generateDebugPythonRequirements FAILED**

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions