0
我有一個Python-Kivy應用程序,我想提供給Android。該應用程序使用Theano和Numpy。使用Python for theano與theano導入,給出IOError:[Errno 21]
Traceback (most recent call last):
I/python (24492): File "main.py", line 19, in <module>
I/python (24492): from theano import function
I/python (24492): File "/data/data/org.example.AppName/files/lib/python2.7/site-packages/theano/__init__.py", line 42, in <module>
I/python (24492): from theano.configdefaults import config
I/python (24492): File "/data/data/org.example.AppName/files/lib/python2.7/site-packages/theano/configdefaults.py", line 1486, in <module>
I/python (24492): "platform": platform.platform(),
I/python (24492): File "/home/user-name/.local/share/python-for-android/build/other_builds/python2/armeabi/python2/python-install/lib/python2.7/platform.py", line 1575, in platform
I/python (24492): File "/home/user-name/.local/share/python-for-android/build/other_builds/python2/armeabi/python2/python-install/lib/python2.7/platform.py", line 163, in libc_ver
I/python (24492): IOError: [Errno 21] Is a directory: '/data/data/org.example.AppName/files'
I/python (24492): Python for android ended.
我不知道如何着手,或者如果它可以導入Theano在安卓Android設備上運行的應用程序時,我得到以下亞行logcat。 Kivy應用程序適用於Linux和Windows。
在此先感謝。
錯誤的實際原因是platform.py對Python可執行文件的位置做出了不正確的假設,並且因爲它是一個目錄而感到困惑。實際上,沒有可執行文件,因爲Python正在通過一個簡短的C程序運行。在這種情況下,我不確定是否應該做某些事情來使平臺模塊正常工作,但是可能需要跟進。然而,在這種情況下,如果現有的問題答案對Theano不支持Android是正確的,那麼在這裏可能沒有用處。 – inclement