2016-06-13 69 views
1

我在導入需求中導入了netifaces。但在完成應用程序之後。在應用程序的運行時,我遇到了在kivy應用程序中導入android上的netifaces的問題。輸出在下面。這是什麼錯誤試圖說。它給出了一些錯誤,如:在kivy buildozer android中導入netifaces錯誤

[Errno 13] Permission denied: '/data/.python-eggs' 

以下是應用程序的完整日誌輸出。

I/python (9404): Traceback (most recent call last): 
I/python (9404): File "/root/.buildozer/android/app/main.py", line 10, in <module> 
I/python (9404): File "build/bdist.linux-i686/egg/netifaces.py", line 7, in <module> 
I/python (9404): File "build/bdist.linux-i686/egg/netifaces.py", line 4, in __bootstrap__ 
I/python (9404): File "/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1161, in resource_filename 
I/python (9404): File "/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1861, in get_resource_filename 
I/python (9404): File "/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1891, in _extract_resource 
I/python (9404): File "/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1227, in get_cache_path 
I/python (9404): File "/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1207, in extraction_error 
I/python (9404): pkg_resources.ExtractionError: Can't extract file(s) to egg cache 
I/python (9404): The following error occurred while trying to extract file(s) to the Python egg 
I/python (9404): cache: 
I/python (9404): [Errno 13] Permission denied: '/data/.python-eggs' 
I/python (9404): 
I/python (9404): The Python egg cache directory is currently set to: 
I/python (9404): 
I/python (9404): /data/.python-eggs 
I/python (9404): 
I/python (9404): Perhaps your account does not have write access to this directory? You can 

I/python (9404): change the cache directory by setting the PYTHON_EGG_CACHE environment 

I/python (9404): variable to point to an accessible directory. 
I/python (9404): 
I/python (9404): Python for android ended. 

我不明白,這是什麼?請你能告訴我爲什麼會出現這個錯誤,我該如何解決這個問題?如果告訴我解決方案,我會非常感謝你。

這裏我buildozer.spec:

[app] 

# (str) Title of your application 
title = My App 

# (str) Package name 
package.name = com.example.myapp 

# (str) Package domain (needed for android/ios packaging) 
package.domain = com.example.myapp 

# (str) Source code where the main.py live 
source.dir = . 

# (list) Source files to include (let empty to include all the files) 
source.include_exts = py,png,jpg,kv,atlas 

# (list) Source files to exclude (let empty to not exclude anything) 
#source.exclude_exts = spec 

# (list) List of directory to exclude (let empty to not exclude anything) 
#source.exclude_dirs = tests, bin 

# (list) List of exclusions using pattern matching 
#source.exclude_patterns = license,images/*/*.jpg 

# (str) Application versioning (method 1) 
version = 1.0 

# (str) Application versioning (method 2) 
# version.regex = __version__ = ['"](.*)['"] 
# version.filename = %(source.dir)s/main.py 

# (list) Application requirements 
# comma seperated e.g. requirements = sqlite3,kivy 
requirements = kivy,openssl,psutil,pyopenssl,setuptools,python,android,pyjnius,netifaces 

# (str) Custom source folders for requirements 
# Sets custom source for any requirements with recipes 
# requirements.source.kivy = ../../kivy 

# (list) Garden requirements 
#garden_requirements = 

# (str) Presplash of the application 
#presplash.filename = %(source.dir)s/data/presplash.png 

# (str) Icon of the application 
icon.filename = icon.png 

# (str) Supported orientation (one of landscape, portrait or all) 
orientation = portrait 

# 
# OSX Specific 
# 

# 
# author = © Copyright Info 

# 
# Android specific 
# 

# (bool) Indicate if the application should be fullscreen or not 
fullscreen = 0 

# (list) Permissions 
android.permissions = INTERNET,ACCESS_WIFI_STATE,READ_PHONE_STATE,ACCESS_NETWORK_STATE 

# (int) Android API to use 
#android.api = 19 

# (int) Minimum API required 
#android.minapi = 9 

# (int) Android SDK version to use 
#android.sdk = 20 

# (str) Android NDK version to use 
#android.ndk = 9c 

# (bool) Use --private data storage (True) or --dir public storage (False) 
#android.private_storage = True 

# (str) Android NDK directory (if empty, it will be automatically downloaded.) 
#android.ndk_path = 

# (str) Android SDK directory (if empty, it will be automatically downloaded.) 
#android.sdk_path = 

# (str) ANT directory (if empty, it will be automatically downloaded.) 
#android.ant_path = 

# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github) 
#android.p4a_dir = 

# (list) python-for-android whitelist 
#android.p4a_whitelist = 

# (str) Android entry point, default is ok for Kivy-based app 
#android.entrypoint = org.renpy.android.PythonActivity 

# (list) List of Java .jar files to add to the libs so that pyjnius can access 
# their classes. Don't add jars that you do not need, since extra jars can slow 
# down the build process. Allows wildcards matching, for example: 
# OUYA-ODK/libs/*.jar 
#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar 

# (list) List of Java files to add to the android project (can be java or a 
# directory containing the files) 
#android.add_src = 

# (str) python-for-android branch to use, if not master, useful to try 
# not yet merged features. 
#android.branch = master 

# (str) OUYA Console category. Should be one of GAME or APP 
# If you leave this blank, OUYA support will not be enabled 
#android.ouya.category = GAME 

# (str) Filename of OUYA Console icon. It must be a 732x412 png image. 
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png 

# (str) XML file to include as an intent filters in <activity> tag 
#android.manifest.intent_filters = 

# (list) Android additionnal libraries to copy into libs/armeabi 
#android.add_libs_armeabi = libs/android/*.so 
#android.add_libs_armeabi_v7a = libs/android-v7/*.so 
#android.add_libs_x86 = libs/android-x86/*.so 
#android.add_libs_mips = libs/android-mips/*.so 

# (bool) Indicate whether the screen should stay on 
# Don't forget to add the WAKE_LOCK permission if you set this to True 
#android.wakelock = False 

# (list) Android application meta-data to set (key=value format) 
#android.meta_data = 

# (list) Android library project to add (will be added in the 
# project.properties automatically.) 
#android.library_references = 

# 
# iOS specific 
# 

# (str) Name of the certificate to use for signing the debug version 
# Get a list of available identities: buildozer ios list_identities 
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)" 

# (str) Name of the certificate to use for signing the release version 
#ios.codesign.release = %(ios.codesign.debug)s 


[buildozer] 

# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output)) 
log_level = 2 

# (int) Display warning if buildozer is run as root (0 = False, 1 = True) 
warn_on_root = 0 


# ----------------------------------------------------------------------------- 
# List as sections 
# 
# You can define all the "list" as [section:key]. 
# Each line will be considered as a option to the list. 
# Let's take [app]/source.exclude_patterns. 
# Instead of doing: 
# 
#[app] 
#source.exclude_patterns = license,data/audio/*.wav,data/images/original/* 
# 
# This can be translated into: 
# 
#[app:source.exclude_patterns] 
#license 
#data/audio/*.wav 
#data/images/original/* 
# 


# ----------------------------------------------------------------------------- 
# Profiles 
# 
# You can extend section/key with a profile 
# For example, you want to deploy a demo version of your application without 
# HD content. You could first change the title to add "(demo)" in the name 
# and extend the excluded directories to remove the HD content. 
# 
#[[email protected]] 
#title = My Application (demo) 
# 
#[app:[email protected]] 
#images/hd/* 
# 
# Then, invoke the command line with the "demo" profile: 
# 
#buildozer --profile demo android debug 

現在你會更好地理解我的問題。

編輯: 在您提出有關錯誤的新建議後,它在buildozer logcat中出現新錯誤,它會使我的應用程序崩潰。以下是在設備上啓動應用程序時獲得的日誌。

I/python (4277): presplash-fit is null 
I/python (4277): presplash (fit=null) mx=0.468750,my=0.746094 
I/libSDL (4277): Physical screen resolution is 480x764 
I/python (4277): Initialize Python for Android 
I/python (4277): ['/data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/files/lib/python2.7/site-packages', '/data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/files/lib/site-python'] 
I/python (4277): Android path ['/data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/files/lib/python27.zip', '/data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/files/lib/python2.7', '/data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/files/lib/python2.7/lib-dynload', '/data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/files/lib/python2.7/site-packages', '/data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/files', '/data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/files/_applibs'] 
I/python (4277): Android kivy bootstrap done. __name__ is __main__ 
I/python (4277): Run user program, change dir and execute main.py 
I/python (4277): [INFO    ] [Logger  ] Record log in /data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/files/.kivy/logs/kivy_16-06-15_2.txt 
I/python (4277): [INFO    ] [Kivy  ] v1.9.1 
I/python (4277): [INFO    ] [Python  ] v2.7.2 (default, Jun 15 2016, 21:33:42) 
I/python (4277): [GCC 4.8] 
I/python (4277): [INFO    ] [Factory  ] 179 symbols loaded 
D/AudioHardware( 89): AudioHardware pcm playback is going to standby. 
D/AudioHardware( 89): closePcmOut_l() mPcmOpenCnt: 1 
I/python (4277): /data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:13: RuntimeWarning: import cdrom: No module named cdrom 
I/python (4277): (ImportError: No module named cdrom) 
I/python (4277): [INFO    ] [Image  ] Providers: img_tex, img_dds, img_gif, img_pygame (img_pil, img_ffpyplayer ignored) 
F/libc (4277): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=14390), thread 4295 (Thread-268) 
I/DEBUG ( 84): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 
I/DEBUG ( 84): Build fingerprint: 'HCM7000HC/HCM7000HC/HCM7000HC:4.1.1/GSDT011/20130802.154043:user/release-keys' 
I/DEBUG ( 84): pid: 4277, tid: 4295, name: Thread-268 >>> in.technhack.mobileinformer.in.technhack.mobileinformer:python <<< 
I/DEBUG ( 84): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000c 
I/DEBUG ( 84):  r0 00000000 r1 5daa60d4 r2 00000000 r3 00000000 
I/DEBUG ( 84):  r4 400effdb r5 00000007 r6 00000000 r7 00000000 
I/DEBUG ( 84):  r8 00000031 r9 587de000 sl 00001084 fp 00003000 
I/DEBUG ( 84):  ip 5daa60b8 sp 5daa60b8 lr 400e4ca9 pc 400e4cba cpsr 40000030 
I/DEBUG ( 84):  d0 696c2f73656c6966 d1 6e6f687479702f62 
I/DEBUG ( 84):  d2 2d62696c2f372e32 d3 2f64616f6c6e7964 
I/DEBUG ( 84):  d4 437f00003f000000 d5 3ff0000000000000 
I/DEBUG ( 84):  d6 437f000043f00000 d7 000000a800000000 
I/DEBUG ( 84):  d8 0000000000000000 d9 0000000000000000 
I/DEBUG ( 84):  d10 0000000000000000 d11 0000000000000000 
I/DEBUG ( 84):  d12 0000000000000000 d13 0000000000000000 
I/DEBUG ( 84):  d14 0000000000000000 d15 0000000000000000 
I/DEBUG ( 84):  d16 4065000000000000 d17 4010000000000000 
I/DEBUG ( 84):  d18 4024000000000000 d19 41d5d8508b000000 
I/DEBUG ( 84):  d20 4000000000000000 d21 0000000000000000 
I/DEBUG ( 84):  d22 0000000000000000 d23 bf66c16c16bebd93 
I/DEBUG ( 84):  d24 3fc555555555553e d25 3ff0000000000000 
I/DEBUG ( 84):  d26 3fd55555518f264d d27 3fdb6db6db6fabff 
I/DEBUG ( 84):  d28 3fe3333333333303 d29 0000000000000000 
I/DEBUG ( 84):  d30 4000000000000000 d31 0000000000000000 
I/DEBUG ( 84):  scr 60000010 
I/DEBUG ( 84): 
I/DEBUG ( 84): backtrace: 
I/DEBUG ( 84):  #00 pc 00005cba /system/bin/linker 
I/DEBUG ( 84):  #01 pc 00000507 [vectors] 
I/DEBUG ( 84): 
I/DEBUG ( 84): stack: 
I/DEBUG ( 84):   5daa6078 5893bed0 
I/DEBUG ( 84):   5daa607c 714613d6 
I/DEBUG ( 84):   5daa6080 0000002c 
I/DEBUG ( 84):   5daa6084 5db338b4 /data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/lib/libpython2.7.so (PyDict_SetItem+228) 
I/DEBUG ( 84):   5daa6088 587c4180 
I/DEBUG ( 84):   5daa608c 5cb75dc8 
I/DEBUG ( 84):   5daa6090 5cb75dc8 
I/DEBUG ( 84):   5daa6094 5893bed0 
I/DEBUG ( 84):   5daa6098 57048da0 
I/DEBUG ( 84):   5daa609c 5db34a58 /data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/lib/libpython2.7.so 
I/DEBUG ( 84):   5daa60a0 00000000 
I/DEBUG ( 84):   5daa60a4 587c4180 
I/DEBUG ( 84):   5daa60a8 400effdb /system/bin/linker 
I/DEBUG ( 84):   5daa60ac 00000007 
I/DEBUG ( 84):   5daa60b0 df002777 
I/DEBUG ( 84):   5daa60b4 e3a070ad 
I/DEBUG ( 84):  #00 5daa60b8 00000000 
I/DEBUG ( 84):   5daa60bc 587c4180 
I/DEBUG ( 84):   5daa60c0 5cb75dc8 
I/DEBUG ( 84):   5daa60c4 5893bed0 
I/DEBUG ( 84):   5daa60c8 00000001 
I/DEBUG ( 84):   5daa60cc 5dd3abfc /data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/lib/libpython2.7.so 
I/DEBUG ( 84):   5daa60d0 0000002c 
I/DEBUG ( 84):   5daa60d4 65726854 
I/DEBUG ( 84):   5daa60d8 322d6461 
I/DEBUG ( 84):   5daa60dc 00003836 
I/DEBUG ( 84):   5daa60e4 57048d00 
I/DEBUG ( 84):   5daa60e8 57048d88 
I/DEBUG ( 84):   5daa60ec 00000000 
I/DEBUG ( 84):   5daa60f0 00000008 
I/DEBUG ( 84):   5daa60f4 5887631b 
I/DEBUG ( 84):   ........ ........ 
I/DEBUG ( 84):  #01 5daa6200 5ac3c35a /system/framework/framework-res.apk 
I/DEBUG ( 84):   5daa6204 5ca88a70 
I/DEBUG ( 84):   5daa6208 00000018 
I/DEBUG ( 84):   5daa620c 5ca88a60 
I/DEBUG ( 84):   5daa6210 00000003 
I/DEBUG ( 84):   5daa6214 0000000e 
I/DEBUG ( 84):   5daa6218 00000817 
I/DEBUG ( 84):   5daa621c 00001204 
I/DEBUG ( 84):   5daa6220 587e2084 /data/data/in.technhack.mobileinformer.in.technhack.mobileinformer/files/netifaces.so 
I/DEBUG ( 84):   5daa6224 00000000 
I/DEBUG ( 84):   5daa6228 00000f60 
I/DEBUG ( 84):   5daa622c c0000000 
I/DEBUG ( 84):   5daa6230 00000000 
I/DEBUG ( 84):   5daa6234 00000000 
I/DEBUG ( 84):   5daa6238 00000000 
I/DEBUG ( 84):   5daa623c 00000000 
I/DEBUG ( 84): 
I/DEBUG ( 84): memory near r1: 
I/DEBUG ( 84):  5daa60b4 e3a070ad 00000000 587c4180 5cb75dc8 .p.......A|X.].\ 
I/DEBUG ( 84):  5daa60c4 5893bed0 00000001 5dd3abfc 0000002c ...X.......],... 
I/DEBUG ( 84):  5daa60d4 65726854 322d6461 00003836 00000000  Thread-268...... 
I/DEBUG ( 84):  5daa60e4 57048d00 57048d88 00000000 00000008 ...W...W........ 
I/DEBUG ( 84):  5daa60f4 5887631b 00000000 57048c50 00000002 .c.X....P..W.... 
I/DEBUG ( 84): 
I/DEBUG ( 84): memory near r4: 
I/DEBUG ( 84):  400effb8 6f626d79 7369206c 746f6e20 6f6c6720 ymbol is not glo 
I/DEBUG ( 84):  400effc8 006c6162 49474953 53004c4c 42414749 bal.SIGILL.SIGAB 
I/DEBUG ( 84):  400effd8 53005452 55424749 49530053 45504647 RT.SIGBUS.SIGFPE 
I/DEBUG ( 84):  400effe8 47495300 56474553 47495300 464b5453 .SIGSEGV.SIGSTKF 
I/DEBUG ( 84):  400efff8 5300544c 49504749 3f004550 3c003f3f LT.SIGPIPE.???.< 
I/DEBUG ( 84): 
I/DEBUG ( 84): memory near r9: 
I/DEBUG ( 84):  587ddfe0 00000000 00000000 00000000 00000000 ................ 
I/DEBUG ( 84):  587ddff0 00000000 00000000 00000000 00000000 ................ 
I/DEBUG ( 84):  587de000 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84):  587de010 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84):  587de020 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84): 
I/DEBUG ( 84): memory near sl: 
I/DEBUG ( 84):  00001064 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84):  00001074 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84):  00001084 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84):  00001094 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84):  000010a4 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84): 
I/DEBUG ( 84): memory near fp: 
I/DEBUG ( 84):  00002fe0 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84):  00002ff0 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84):  00003000 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84):  00003010 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84):  00003020 ffffffff ffffffff ffffffff ffffffff ................ 
I/DEBUG ( 84): 
I/DEBUG ( 84): memory near ip: 
I/DEBUG ( 84):  5daa6098 57048da0 5db34a58 00000000 587c4180 ...WXJ.].....A|X 
I/DEBUG ( 84):  5daa60a8 400effdb 00000007 df002777 e3a070ad [email protected]'...p.. 
I/DEBUG ( 84):  5daa60b8 00000000 587c4180 5cb75dc8 5893bed0 .....A|X.].\...X 
I/DEBUG ( 84):  5daa60c8 00000001 5dd3abfc 0000002c 65726854 .......],...Thre 
I/DEBUG ( 84):  5daa60d8 322d6461 00003836 00000000 57048d00 ad-268.........W 
I/DEBUG ( 84): 
I/DEBUG ( 84): memory near sp: 
I/DEBUG ( 84):  5daa6098 57048da0 5db34a58 00000000 587c4180 ...WXJ.].....A|X 
I/DEBUG ( 84):  5daa60a8 400effdb 00000007 df002777 e3a070ad [email protected]'...p.. 
I/DEBUG ( 84):  5daa60b8 00000000 587c4180 5cb75dc8 5893bed0 .....A|X.].\...X 
I/DEBUG ( 84):  5daa60c8 00000001 5dd3abfc 0000002c 65726854 .......],...Thre 
I/DEBUG ( 84):  5daa60d8 322d6461 00003836 00000000 57048d00 ad-268.........W 
I/DEBUG ( 84): 
I/DEBUG ( 84): code around pc: 
I/DEBUG ( 84):  400e4c98 2200447c a9072010 46139200 ebaef000 |D.". .....F.... 
I/DEBUG ( 84):  400e4ca8 4963b128 4479a807 eae6f000 f88de001 (.cI..yD........ 
I/DEBUG ( 84):  400e4cb8 68f7002c f00068b6 4a5eeb94 a907462b ,..h.h....^J+F.. 
I/DEBUG ( 84):  400e4cc8 447a9104 e88d2180 96020090 a82c9003 ..zD.!........,. 
I/DEBUG ( 84):  400e4cd8 fd0ef7ff aa2c4958 44792007 f8acf001 ....XI,.. yD.... 
I/DEBUG ( 84): 
I/DEBUG ( 84): code around lr: 
I/DEBUG ( 84):  400e4c88 4c68e007 e004447c 447c4c67 4c67e001 ..hL|D..gL|D..gL 
I/DEBUG ( 84):  400e4c98 2200447c a9072010 46139200 ebaef000 |D.". .....F.... 
I/DEBUG ( 84):  400e4ca8 4963b128 4479a807 eae6f000 f88de001 (.cI..yD........ 
I/DEBUG ( 84):  400e4cb8 68f7002c f00068b6 4a5eeb94 a907462b ,..h.h....^J+F.. 
I/DEBUG ( 84):  400e4cc8 447a9104 e88d2180 96020090 a82c9003 ..zD.!........,. 
I/BootReceiver( 259): Copying /data/tombstones/tombstone_06 to DropBox (SYSTEM_TOMBSTONE) 
W/DropBoxManagerService( 259): Dropping: SYSTEM_TOMBSTONE (10 > 0 bytes) 
I/WindowState( 259): WIN DEATH: Window{4178f2a8 SurfaceView paused=false} 
I/ActivityManager( 259): Process in.technhack.mobileinformer.in.technhack.mobileinformer:python (pid 4277) has died. 

我認爲這是調試錯誤,但我該如何解決這個問題。

+0

是否有沒有任何包的簡單應用程序適合您,或者您是否也獲得了「權限被拒絕」?錯誤很明顯,它會嘗試將egg提取到一個沒有寫入權限的文件夾。一個規格也會很好。 – KeyWeeUsr

+0

是的,它工作沒有任何錯誤,但我只有在這個包netifaces錯誤,當我添加建設者的要求。我不會從任何其他包中增加建設者的要求的錯誤。這個'蛋'是什麼?以及爲什麼我沒有獲得寫權限。我需要在我的應用中導入這個包,因爲它是需要的。我正在編輯我的問題,我在我的問題中添加了buildozer.spec。所以你可以更好地理解它。 –

回答

1

錯誤很明顯,它會嘗試將egg提取到一個沒有寫入權限的文件夾。

蟒蛇.eggthis,但它似乎有點奇怪,其他軟件包的工作,這一點......不。

但是我看着它的代碼,它是not pure-python然而當我看到食譜的評論時,作者提到食譜創建了一個egg並且不安裝它。

你可以看看其他食譜,找到缺少的東西並測試它。如果運行,配方應該沒問題。嘗試在this line的末尾添加-v,因爲我在包含C代碼的某些包中發現它。

編輯:

我也許找到了一種方法(或兩個)如何做到這一點不.egg文件。我還沒有嘗試過,因爲我現在沒有虛擬機。閱讀this answer。對配方在buildozer的P4A安裝備份你,然後編輯netifaces配方:

變化this到:

try $BUILD_hostpython/hostpython setup.py install -O2 --prefix $BUILD_PATH/python-install --old-and-unmanageable 

如果它不工作,然後嘗試做出不同的改變配方。更改this到:

try $BUILD_hostpython/hostpython setup.py build_ext --inplace 

然後運行buildozer,讓它創建的應用程序,但它仍然不玩了。通過.buildozer文件夾(我認爲?)在哪裏安裝p4a(如果沒有,然後看看home/文件夾也許.python-for-android將在那裏)。你需要找到netifaces的源代碼,因爲它現在應該包含編譯的東西(.o和/或.so文件)。

如果您找到它們,那麼它就是您想要的文件夾。將包含已編譯文件的整個netifaces文件夾複製到您應用程序的文件夾中,從requirements中刪除netifaces,.spec並再次運行該構建器。希望它會起作用。

對於每個配方更改,您應清除netifaces程序包的緩存文件,因爲它將包含舊文件,甚至可能包含.egg文件。

此外,你應該檢查IRC,也許有人有同樣的問題或知道如何解決該配方。

+0

它不起作用。我在行尾添加-v。但它對我不起作用。任何其他解決方案。 –

+0

好了,你要麼編輯配方,以便它適用於你,或者嘗試甚至''出口PYTHON_EGG_CACHE =/tmp/python-eggs'(與'export' SDK相同),就像錯誤告訴你的一樣。希望它會起作用。 – KeyWeeUsr

+0

這裏應該加上這一行。在recipe.sh文件的netifaces?你能告訴我那個嗎? 'export PYTHON_EGG_CACHE =/tmp/python-eggs',請告訴我添加它的行。請先生 –

相關問題