こんにちは、chaquopy を使用して Python スクリプトを実行しようとしていますが、インポート部分で問題が発生しています。外部ライブラリを必要とせず、build.gradle に記述するインストール コードを使用しないスクリプトを実行すると、問題なく動作します。
python{
pip{
install "numpy"
}
}
そのインストール コードを挿入するとすぐに問題が発生します。以下のエラー メッセージが表示されます。
> Task :app:generateDebugPythonRequirements
C:\Users\q\AndroidStudioProjects\Chaquopy_Practice\app\build\generated\python\bp.zip\pip\_vendor\ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
C:\Users\q\AndroidStudioProjects\Chaquopy_Practice\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 armeabi-v7a
C:\Users\q\AndroidStudioProjects\Chaquopy_Practice\app\build\generated\python\bp.zip\pip\_vendor\ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
C:\Users\q\AndroidStudioProjects\Chaquopy_Practice\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 numpy
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/numpy/
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/numpy/
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/numpy/
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/numpy/
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/numpy/
Could not fetch URL https://pypi.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/numpy/ (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/numpy/
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/numpy/
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/numpy/
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/numpy/
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/numpy/
Could not fetch URL https://chaquo.com/pypi-7.0/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='chaquo.com', port=443): Max retries exceeded with url: /pypi-7.0/numpy/ (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 numpy (from versions: )
No matching distribution found for numpy
Chaquopy: Exit status 1
SSLError は他の人にも起こったと思いますが、SyntaxWarning: 'str' object ~~ が何であるかを見つけることができませんでした。