kivy / kivy-ios

Toolchain for compiling Python / Kivy / other libraries for iOS
https://kivy.org/docs/guide/packaging-ios.html
MIT License
782 stars 240 forks source link

Numpy module cannot be found in toolchain created Xcode project #603

Closed emre84 closed 3 years ago

emre84 commented 3 years ago

Versions

Describe the bug I want to develop an application with Kivy for iOS devices. But when I run my application with toolchain created Xcode project, "ModuleNotFoundError: No module named 'numpy'" error pops up in Xcode project

To Reproduce 0-install Kivy-ios: python3.7 -m pip install kivy-ios brew install autoconf automake libtool pkg-config brew link libtool python3.7 pip installation for all required tools: requirements.txt git clone git://github.com/kivy/kivy-ios cd kivy-ios python3.7 toolchain.py build python3 kivy->[ERROR ] Missing requirement: cython is not installed_ (copied my cython exec from my Python3.7 folder into /usr/local/bin and re-executed "python3.7 toolchain.py build python3 kivy" again. Please see Additional context for explanation)

1-install Numpy: python3.7 -m pip install Numpy

2-Create Xcode project with a dummy python code which includes Numpy import: sudo python3.7 /Users/emre/Documents/kivy-ios-master/kivy_ios/toolchain.py create wsb /Users/emre/Documents/Temp/WSB (please see dummy python file below which will be converted into Xcode file) main.txt

3-open project: Modify team field ->your account Modify build phases:run script:shell /bin/bash->rsync -av -O --no-perms --delete "/Users/emre/Documents/Temp/WSB"/ "$PROJECT_DIR"/YourApp

4-run project: run project on any ios iPhoneSimulator or device and error log "ModuleNotFoundError: No module named 'imutils'" pops up. install imutils->sudo python3.7 toolchain.py pip install imutils run project on any ios iPhoneSimulator or device and error log "ModuleNotFoundError: No module named 'Numpy'" pops up.(Although it was already installed in python 3.7) install numpy->sudo python3.7 toolchain.py pip install Numpy installation cannot be done.Please see log below.

Expected behavior Loading project on iOS without any error

Logs Xcode error log: 2021-03-31 22:47:54.965840+0200 wsb[68196:289893] Available orientation: KIVY_ORIENTATION=LandscapeLeft LandscapeRight Portrait PortraitUpsideDown 2021-03-31 22:47:54.966025+0200 wsb[68196:289893] Initializing python 2021-03-31 22:47:55.216308+0200 wsb[68196:289893] Running main.py: /Users/emre/Library/Developer/CoreSimulator/Devices/91B8D870-307A-4B75-A778-FD3C42FB941C/data/Containers/Bundle/Application/29898B5A-D5B1-43A7-B198-C25A0CE3530B/wsb.app/YourApp/main.pyc Traceback (most recent call last): File "/Users/emre/Documents/kivy-ios-master/wsb-ios/YourApp/main.py", line 1, in File "/Users/emre/Library/Developer/CoreSimulator/Devices/91B8D870-307A-4B75-A778-FD3C42FB941C/data/Containers/Bundle/Application/29898B5A-D5B1-43A7-B198-C25A0CE3530B/wsb.app/lib/python3.9/site-packages/imutils/init.py", line 8, in from .convenience import translate File "/Users/emre/Library/Developer/CoreSimulator/Devices/91B8D870-307A-4B75-A778-FD3C42FB941C/data/Containers/Bundle/Application/29898B5A-D5B1-43A7-B198-C25A0CE3530B/wsb.app/lib/python3.9/site-packages/imutils/convenience.py", line 5, in import numpy as np ModuleNotFoundError: No module named 'numpy' 2021-03-31 22:47:55.224631+0200 wsb[68196:289893] Application quit abnormally! 2021-03-31 22:47:55.234595+0200 wsb[68196:289893] Leaving

Toolchain error log 1: sudo python3.7 toolchain.py build python3 numpy Toolchain_error_log.txt

Toolchain error log 2: sudo python3.7 toolchain.py pip install numpy toolchain_pip_install.txt

Screenshots

Screenshot 2021-04-01 at 22 05 13

Additional context As you can see above logs, i have tried "sudo python3.7 toolchain.py build python3 numpy" and "sudo python3.7 toolchain.py pip install numpy" commands either, none of them worked.

2 Additional points I have to mention which could be reason of build problems:

1- Python3.9 is used in toolchain: Somehow toolchain is using Python3.9(Please see my log files to see if python3.9 is used), although python3.7 command is sent for toolchain methods "sudo python3.7 toolchain.py build python3 numpy". If it is the problem than could anyone please inform me what i have to do to switch python3.7?

Note: I have also tried following steps to see if python3.9 would work fine or not A-

B-

2-when i tried to toolchain build python3 Kivy, i got following error about cython at the beginning :

emres-Air:kivy-ios-master 2 emre$ sudo python3 toolchain.py build python3 kivy

/Users/emre/Documents/kivy-ios-master/kivyios/toolchain.py:94: DeprecationWarning: ChromeDownloader style of invoking requests is deprecated. Use newer urlopen functions/methods urlretrieve = ChromeDownloader().retrieve [ERROR ] Missing requirement: cython is not installed

than i debugged the code and recognized that toolchain was trying to execute cython exec from /usr/local/bin/cython directory but there was no cython.exec there. Therefore i copied my cython exec from my Python3.7 folder into /usr/local/bin and than I could create my xcode project.

Note:I have tried also to copy my cython file to /usr/local/bin from python3.9, after creating Xcode project with python3.9 and executing, I got the same "Numpy module not found" error.

My Python Pip installation versions: emres-Air:kivy-ios-master emre$ python3.7 -m pip list Package Version


absl-py 0.11.0 appnope 0.1.2 appscript 1.1.1 argon2-cffi 20.1.0 arrow 1.0.3 astor 0.8.1 async-generator 1.10 attrs 20.3.0 backcall 0.2.0 binaryornot 0.4.4 bleach 3.3.0 cached-property 1.5.2 cachetools 4.2.1 certifi 2020.12.5 cffi 1.14.5 chardet 4.0.0 click 7.1.2 colorama 0.4.4 contextlib2 0.6.0.post1 cookiecutter 1.7.2 cryptography 2.9.2 cycler 0.10.0 Cython 0.29.17 decorator 4.4.2 defusedxml 0.6.0 docopt 0.6.2 docutils 0.16 entrypoints 0.3 flatbuffers 1.12 future 0.18.2 gast 0.2.2 google-api-core 1.26.1 google-api-python-client 1.8.0 google-auth 1.27.1 google-auth-httplib2 0.1.0 google-pasta 0.2.0 googleapis-common-protos 1.53.0 grpcio 1.35.0 h5py 3.1.0 httplib2 0.19.0 idna 2.10 importlib-metadata 3.7.2 imutils 0.5.4 ipykernel 5.4.3 ipython 7.20.0 ipython-genutils 0.2.0 ipywidgets 7.6.3 jedi 0.18.0 Jinja2 2.11.3 jinja2-time 0.2.0 jsonschema 3.2.0 jupyter 1.0.0 jupyter-client 6.1.11 jupyter-console 6.2.0 jupyter-core 4.7.1 jupyterlab-pygments 0.1.2 jupyterlab-widgets 1.0.0 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.2 keyring 23.0.0 Kivy 2.0.0 Kivy-Garden 0.1.4 kivy-ios 1.2.1 kiwisolver 1.3.1 lvis 0.5.3 lxml 4.6.2 Markdown 3.3.3 MarkupSafe 1.1.1 matplotlib 3.3.4 mistune 0.8.4 mock 4.0.3 MouseInfo 0.1.3 nbclient 0.5.2 nbconvert 6.0.7 nbformat 5.1.2 nest-asyncio 1.5.1 notebook 6.2.0 numpy 1.18.2 opencv-python 4.5.1.48 openstep-parser 1.5.3 opt-einsum 3.3.0 packaging 20.9 pandas 1.2.2 pandocfilters 1.4.3 parso 0.8.1 pbxproj 2.5.1 pexpect 4.8.0 pickleshare 0.7.5 Pillow 8.1.0 pip 21.0.1 pkginfo 1.7.0 poyo 0.5.0 prometheus-client 0.9.0 prompt-toolkit 3.0.16 protobuf 3.14.0 ptyprocess 0.7.0 pyasn1 0.4.8 pyasn1-modules 0.2.8 PyAutoGUI 0.9.50 pycocotools 2.0.2 pycparser 2.20 PyGetWindow 0.0.9 Pygments 2.7.4 PyJWT 2.0.1 PyMsgBox 1.0.9 pyobjc 6.2.1 pyobjc-core 6.2.1 pyobjc-framework-Accounts 6.2.1 pyobjc-framework-AddressBook 6.2.1 pyobjc-framework-AdSupport 6.2.1 pyobjc-framework-AppleScriptKit 6.2.1 pyobjc-framework-AppleScriptObjC 6.2.1 pyobjc-framework-ApplicationServices 6.2.1 pyobjc-framework-AuthenticationServices 6.2.1 pyobjc-framework-AutomaticAssessmentConfiguration 6.2.1 pyobjc-framework-Automator 6.2.1 pyobjc-framework-AVFoundation 6.2.1 pyobjc-framework-AVKit 6.2.1 pyobjc-framework-BusinessChat 6.2.1 pyobjc-framework-CalendarStore 6.2.1 pyobjc-framework-CFNetwork 6.2.1 pyobjc-framework-CloudKit 6.2.1 pyobjc-framework-Cocoa 6.2.1 pyobjc-framework-Collaboration 6.2.1 pyobjc-framework-ColorSync 6.2.1 pyobjc-framework-Contacts 6.2.1 pyobjc-framework-ContactsUI 6.2.1 pyobjc-framework-CoreAudio 6.2.1 pyobjc-framework-CoreAudioKit 6.2.1 pyobjc-framework-CoreBluetooth 6.2.1 pyobjc-framework-CoreData 6.2.1 pyobjc-framework-CoreHaptics 6.2.1 pyobjc-framework-CoreLocation 6.2.1 pyobjc-framework-CoreMedia 6.2.1 pyobjc-framework-CoreMediaIO 6.2.1 pyobjc-framework-CoreML 6.2.1 pyobjc-framework-CoreMotion 6.2.1 pyobjc-framework-CoreServices 6.2.1 pyobjc-framework-CoreSpotlight 6.2.1 pyobjc-framework-CoreText 6.2.1 pyobjc-framework-CoreWLAN 6.2.1 pyobjc-framework-CryptoTokenKit 6.2.1 pyobjc-framework-DeviceCheck 6.2.1 pyobjc-framework-DictionaryServices 6.2.1 pyobjc-framework-DiscRecording 6.2.1 pyobjc-framework-DiscRecordingUI 6.2.1 pyobjc-framework-DiskArbitration 6.2.1 pyobjc-framework-DVDPlayback 6.2.1 pyobjc-framework-EventKit 6.2.1 pyobjc-framework-ExceptionHandling 6.2.1 pyobjc-framework-ExecutionPolicy 6.2.1 pyobjc-framework-ExternalAccessory 6.2.1 pyobjc-framework-FileProvider 6.2.1 pyobjc-framework-FileProviderUI 6.2.1 pyobjc-framework-FinderSync 6.2.1 pyobjc-framework-FSEvents 6.2.1 pyobjc-framework-GameCenter 6.2.1 pyobjc-framework-GameController 6.2.1 pyobjc-framework-GameKit 6.2.1 pyobjc-framework-GameplayKit 6.2.1 pyobjc-framework-ImageCaptureCore 6.2.1 pyobjc-framework-IMServicePlugIn 6.2.1 pyobjc-framework-InputMethodKit 6.2.1 pyobjc-framework-InstallerPlugins 6.2.1 pyobjc-framework-InstantMessage 6.2.1 pyobjc-framework-Intents 6.2.1 pyobjc-framework-IOSurface 6.2.1 pyobjc-framework-iTunesLibrary 6.2.1 pyobjc-framework-LatentSemanticMapping 6.2.1 pyobjc-framework-LaunchServices 6.2.1 pyobjc-framework-libdispatch 6.2.1 pyobjc-framework-LinkPresentation 6.2.1 pyobjc-framework-LocalAuthentication 6.2.1 pyobjc-framework-MapKit 6.2.1 pyobjc-framework-MediaAccessibility 6.2.1 pyobjc-framework-MediaLibrary 6.2.1 pyobjc-framework-MediaPlayer 6.2.1 pyobjc-framework-MediaToolbox 6.2.1 pyobjc-framework-Metal 6.2.1 pyobjc-framework-MetalKit 6.2.1 pyobjc-framework-ModelIO 6.2.1 pyobjc-framework-MultipeerConnectivity 6.2.1 pyobjc-framework-NaturalLanguage 6.2.1 pyobjc-framework-NetFS 6.2.1 pyobjc-framework-Network 6.2.1 pyobjc-framework-NetworkExtension 6.2.1 pyobjc-framework-NotificationCenter 6.2.1 pyobjc-framework-OpenDirectory 6.2.1 pyobjc-framework-OSAKit 6.2.1 pyobjc-framework-OSLog 6.2.1 pyobjc-framework-PencilKit 6.2.1 pyobjc-framework-Photos 6.2.1 pyobjc-framework-PhotosUI 6.2.1 pyobjc-framework-PreferencePanes 6.2.1 pyobjc-framework-PushKit 6.2.1 pyobjc-framework-Quartz 6.2.1 pyobjc-framework-QuickLookThumbnailing 6.2.1 pyobjc-framework-SafariServices 6.2.1 pyobjc-framework-SceneKit 6.2.1 pyobjc-framework-ScreenSaver 6.2.1 pyobjc-framework-ScriptingBridge 6.2.1 pyobjc-framework-SearchKit 6.2.1 pyobjc-framework-Security 6.2.1 pyobjc-framework-SecurityFoundation 6.2.1 pyobjc-framework-SecurityInterface 6.2.1 pyobjc-framework-ServiceManagement 6.2.1 pyobjc-framework-Social 6.2.1 pyobjc-framework-SoundAnalysis 6.2.1 pyobjc-framework-Speech 6.2.1 pyobjc-framework-SpriteKit 6.2.1 pyobjc-framework-StoreKit 6.2.1 pyobjc-framework-SyncServices 6.2.1 pyobjc-framework-SystemConfiguration 6.2.1 pyobjc-framework-SystemExtensions 6.2.1 pyobjc-framework-UserNotifications 6.2.1 pyobjc-framework-VideoSubscriberAccount 6.2.1 pyobjc-framework-VideoToolbox 6.2.1 pyobjc-framework-Vision 6.2.1 pyobjc-framework-WebKit 6.2.1 pyparsing 2.4.7 pyperclip 1.8.2 PyQt5 5.12 PyQt5-sip 4.19.19 PyRect 0.1.4 pyrsistent 0.17.3 PyScreeze 0.1.26 python-dateutil 2.8.1 python-slugify 4.0.1 PyTweening 1.0.3 pytz 2021.1 pyzmq 22.0.3 qtconsole 5.0.2 QtPy 1.9.0 readme-renderer 29.0 requests 2.25.1 requests-toolbelt 0.9.1 rfc3986 1.4.0 rsa 4.7.2 rubicon-objc 0.4.0 scipy 1.6.0 Send2Trash 1.5.0 setuptools 53.0.0 sh 1.12.14 six 1.15.0 tensorboard 1.14.0 tensorflow 1.14.1 tensorflow-estimator 1.14.0 termcolor 1.1.0 terminado 0.9.2 testpath 0.4.4 text-unidecode 1.3 tf-slim 1.1.0 tflite-runtime 2.5.0 tinydb 4.4.0 tornado 6.1 tqdm 4.59.0 traitlets 5.0.5 twilio 6.46.0 twine 3.3.0 typing-extensions 3.7.4.3 uritemplate 3.0.1 urllib3 1.26.3 wcwidth 0.2.5 webencodings 0.5.1 Werkzeug 1.0.1 wheel 0.36.2 widgetsnbextension 3.5.1 wrapt 1.12.1 zipp 3.4.0 emres-Air:kivy-ios-master emre$

python3.7 toolchain.py recipes audiostream master
click 7.1.2
curly master
cymunk master
ffmpeg n4.3.1
ffpyplayer 4.2.0
flask 1.1.2
freetype 2.5.5
host_setuptools3 54.1.2
hostlibffi 3.2.1
hostopenssl 1.1.1g
hostpython3 3.9.2
ios master
itsdangerous 1.1.0
jinja2 2.11.2
kivent_core master
kivy b5ec51ed2315a9a890f264b0df6d23c8e6341d42 libcurl 7.65.3
libffi 3.2.1
libjpeg v9a
libpng 1.6.26
libzbar 0.10
markupsafe 1.1.1
netifaces 0.10.9
numpy 1.16.4
openssl 1.1.1g
photolibrary master
pillow 6.1.0
plyer master
pycrypto 2.6.1
pykka 1.2.1
pyobjus master
python3 3.9.2
pyyaml 3.11
sdl2 7cc4fc886d9e sdl2_image 2.0.4
sdl2_mixer 2.0.4
sdl2_ttf 2.0.14
werkzeug 1.0.1
zbarlight 1.2

emres-MacBook-Air:kivy-ios-master emre$ python3.7 toolchain.py status audiostream - Not built click - Not built curly - Not built cymunk - Not built ffmpeg - Not built ffpyplayer - Not built flask - Not built freetype - Build OK (built at 2021-03-29 19:16:13.139727) host_setuptools - Not built host_setuptools3 - Build OK (built at 2021-03-29 19:37:22.434551) hostlibffi - Build OK (built at 2021-03-31 20:53:58.024916) hostopenssl - Build OK (built at 2021-03-29 19:18:18.673672) hostpython3 - Build OK (built at 2021-03-29 19:28:20.452712) ios - Build OK (built at 2021-03-29 19:37:39.674279) itsdangerous - Not built jinja2 - Not built kivent_core - Not built kivy - Build OK (built at 2021-03-29 19:43:53.376505) libcurl - Not built libffi - Build OK (built at 2021-03-29 19:20:55.490678) libjpeg - Not built libpng - Not built libzbar - Not built markupsafe - Not built netifaces - Not built numpy - Not built openssl - Build OK (built at 2021-03-29 19:23:26.620631) photolibrary - Not built pillow - Not built plyer - Not built pycrypto - Not built pykka - Not built pyobjus - Build OK (built at 2021-03-29 19:38:51.183926) python3 - Build OK (built at 2021-03-29 19:37:13.653062) pyyaml - Not built sdl2 - Build OK (built at 2021-03-29 19:24:26.298797) sdl2_image - Build OK (built at 2021-03-29 19:28:43.417565) sdl2_mixer - Build OK (built at 2021-03-29 19:29:25.476809) sdl2_ttf - Build OK (built at 2021-03-29 19:29:28.870168) werkzeug - Not built zbarlight - Not built

emres-Air:kivy-ios-master emre$ python3 --version Python 3.7.3

misl6 commented 3 years ago

Hi @emre84 ,

The major issue you're raising is the following one (from your Toolchain_error_log.txt):

[DEBUG   ] numpy/random/mtrand/mtrand.c:40560:34: error: no member named 'tp_print' in
[DEBUG   ]       'struct _typeobject'
[DEBUG   ]   __pyx_type_6mtrand_RandomState.tp_print = 0;

I haven't tested it yet, but I assume this is due to the migration to python3.9.2 that was recently introduced. The numpy recipe is a little bit outdated, and seems (from Discord chat that I had with users and issues on Github) was partially broken also on python3.8.2.

Some tips & considerations:

Current workaround (Upgrading numpy recipe is on my TODO list, but I don't have an ETA for this):

Instead of using the current kivy-ios master, consider using version 1.2.1, that targets python3.8.2, but consider that as said before numpy it is reported as potentially broken during runtime also on version 1.2.1.

I will try to do my best to upgrade the numpy recipe ASAP, but help is really appreciated.

emre84 commented 3 years ago

Hi Misl6,

Thank you very much for your response. I will give 1.2.1 a try, and give you feedback. If it does not work, maybe I can try other versions till I make it work :)

Have a nice weekend. Emre

emre84 commented 3 years ago

Hi Misl6,

Since I have caught a Kivy expert, I want to use the opportunity :D 2 more questions:

1- It means that What I have done above (coping my cython exec from my Python3.7 folder into /usr/local/bin) was not a wrong approach. Am I right? Because I faced also the same error with 1.2.1 build and used the same workaround.

2-You don't need to install numpy (or other packages you're building/installing with kivy-ios) into your development environment (unless you need it on your local machine) (I'm referring to your "1-install Numpy" step)

Does it mean that, it does not matter what I have installed in my local python, I have to install everything with following command again to install the module into my toolchain hostpython3:

python3.7 toolchain.py pip install XXX or python3.7 toolchain.py build XXX

I thought that "python3.7 toolchain.py build python3 Kivy" will already convert every modules which are already installed in my python into toolchain hostpython3.

Thanks a lot in advance.

misl6 commented 3 years ago

Replying to your questions (but please be aware that We have a support chat on Discord):

1) It is actually a wrong approach to copy an executable from a location to another. You should avoid that, and in that specific case using a virtual environment is definitely a good idea so you can manage different dependencies versions.

2) Yes, it does not matter what you have installed on your local python. Every package that needs to be available on your app should be built via python3.7 toolchain.py build XXXor if it is a plain python package via python3.7 toolchain.py pip install XXX.

BTW, the PR (#604) that fixes the issue that I found out via your Toolchain_error_log.txt just got merged. So I'm closing this issue. Feel free to reopen a new one if needed.

emre84 commented 3 years ago

Hi Misl6,

Thank you very much for your fast solution. Numpy installation works perfect.

But this time I have an other problem with opencv-python installation. I guess I will have more problems with my installations, since my project requires several modules. Should I proceed with this issue, or should I prefer https://discord.com?:

Log:

emres-Air:kivy-ios-master emre$ python3.7 toolchain.py pip install opencv-python [INFO ] Include dir added: {arch.arch}/freetype [INFO ] Include dir added: {arch.arch}/hostlibffi [INFO ] Global: hostpython located at /Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/python [INFO ] Global: hostpgen located at /Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/pgen [INFO ] Include dir added: {arch.arch}/ffi [INFO ] Include dir added: common/numpy [INFO ] Include dir added: {arch.arch}/openssl [INFO ] Include dir added: common/sdl2 [INFO ] Include dir added: common/sdl2_image [INFO ] Include dir added: common/sdl2_mixer [INFO ] Include dir added: common/sdl2_ttf [INFO ] Executing pip with: ['install', '--isolated', '--prefix', '/Users/emre/Documents/kivy-ios-master/dist/root/python3', 'opencv-python'] [INFO ] Running Shell: /Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/pip3 ('install', '--isolated', '--prefix', '/Users/emre/Documents/kivy-ios-master/dist/root/python3', 'opencv-python') {'_env': {'CC': '/bin/false', 'CXX': '/bin/false', 'PYTHONPATH': '/Users/emre/Documents/kivy-ios-master/dist/root/python3/lib/python3.9/site-packages', 'PYTHONOPTIMIZE': '2'}, '_iter': True, '_out_bufsize': 1, '_err_to_out': True} [DEBUG ] Collecting opencv-python [DEBUG ] Using cached opencv-python-4.5.1.48.tar.gz (88.3 MB) [DEBUG ] Installing build dependencies ... error [DEBUG ] ERROR: Command errored out with exit status 1: [DEBUG ] command: /Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/python3.9 /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-dlqinc5j/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_machine != '"'"'aarch64'"'"'' 'numpy==1.19.3; python_version>='"'"'3.6'"'"' and sys_platform == '"'"'linux'"'"' and platform_machine == '"'"'aarch64'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_machine != '"'"'aarch64'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_machine != '"'"'aarch64'"'"'' 'numpy==1.19.3; python_version>='"'"'3.9'"'"' and platform_machine != '"'"'aarch64'"'"'' [DEBUG ] cwd: None [DEBUG ] Complete output (237 lines): [DEBUG ] Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64"' don't match your environment [DEBUG ] Ignoring numpy: markers 'python_version >= "3.6" and sys_platform == "linux" and platform_machine == "aarch64"' don't match your environment [DEBUG ] Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64"' don't match your environment [DEBUG ] Ignoring numpy: markers 'python_version == "3.8" and platform_machine != "aarch64"' don't match your environment [DEBUG ] Collecting setuptools [DEBUG ] Using cached setuptools-54.2.0-py3-none-any.whl (785 kB) [DEBUG ] Collecting wheel [DEBUG ] Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB) [DEBUG ] Collecting scikit-build [DEBUG ] Using cached scikit_build-0.11.1-py2.py3-none-any.whl (72 kB) [DEBUG ] Collecting cmake [DEBUG ] Using cached cmake-3.18.4.post1.tar.gz (28 kB) [DEBUG ] Installing build dependencies: started [DEBUG ] Installing build dependencies: finished with status 'done' [DEBUG ] Getting requirements to build wheel: started [DEBUG ] Getting requirements to build wheel: finished with status 'done' [DEBUG ] Preparing wheel metadata: started [DEBUG ] Preparing wheel metadata: finished with status 'done' [DEBUG ] Collecting pip [DEBUG ] Using cached pip-21.0.1-py3-none-any.whl (1.5 MB) [DEBUG ] Collecting numpy==1.19.3 [DEBUG ] Using cached numpy-1.19.3.zip (7.3 MB) [DEBUG ] Installing build dependencies: started [DEBUG ] Installing build dependencies: finished with status 'done' [DEBUG ] Getting requirements to build wheel: started [DEBUG ] Getting requirements to build wheel: finished with status 'done' [DEBUG ] Preparing wheel metadata: started [DEBUG ] Preparing wheel metadata: finished with status 'error' [DEBUG ] ERROR: Command errored out with exit status 1: [DEBUG ] command: /Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/python3.9 /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp5tz_l874 [DEBUG ] cwd: /private/tmp/pip-install-i0bt0k4v/numpy [DEBUG ] Complete output (201 lines): [DEBUG ] Running from numpy source directory. [DEBUG ] setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates [DEBUG ] run_build = parse_setuppy_commands() [DEBUG ] Processing numpy/random/_bounded_integers.pxd.in [DEBUG ] Processing numpy/random/_philox.pyx [DEBUG ] Processing numpy/random/_bounded_integers.pyx.in [DEBUG ] Processing numpy/random/_sfc64.pyx [DEBUG ] Processing numpy/random/_mt19937.pyx [DEBUG ] Processing numpy/random/bit_generator.pyx [DEBUG ] Processing numpy/random/mtrand.pyx [DEBUG ] Processing numpy/random/_generator.pyx [DEBUG ] Processing numpy/random/_pcg64.pyx [DEBUG ] Processing numpy/random/_common.pyx [DEBUG ] Cythonizing sources [DEBUG ] blas_opt_info: [DEBUG ] blas_mkl_info: [DEBUG ] customize UnixCCompiler [DEBUG ] C compiler: /bin/false [DEBUG ]
[DEBUG ] creating /tmp/tmps02cbiky/tmp [DEBUG ] creating /tmp/tmps02cbiky/tmp/tmps02cbiky [DEBUG ] compile options: '-MMD -MF /tmp/tmps02cbiky/file.c.d -c' [DEBUG ] false: /tmp/tmps02cbiky/file.c [DEBUG ] libraries mkl_rt not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] blis_info: [DEBUG ] libraries blis not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] openblas_info: [DEBUG ] libraries openblas not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] atlas_3_10_blas_threads_info: [DEBUG ] Setting PTATLAS=ATLAS [DEBUG ] libraries tatlas not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] atlas_3_10_blas_info: [DEBUG ] libraries satlas not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] atlas_blas_threads_info: [DEBUG ] Setting PTATLAS=ATLAS [DEBUG ] libraries ptf77blas,ptcblas,atlas not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] atlas_blas_info: [DEBUG ] libraries f77blas,cblas,atlas not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] accelerate_info: [DEBUG ] libraries accelerate not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] Library accelerate was not found. Ignoring [DEBUG ] libraries veclib not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] Library veclib was not found. Ignoring [DEBUG ] FOUND: [DEBUG ] extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers'] [DEBUG ] extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] [DEBUG ] define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)] [DEBUG ]
[DEBUG ] FOUND: [DEBUG ] extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers'] [DEBUG ] extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] [DEBUG ] define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)] [DEBUG ]
[DEBUG ] non-existing path in 'numpy/distutils': 'site.cfg' [DEBUG ] lapack_opt_info: [DEBUG ] lapack_mkl_info: [DEBUG ] libraries mkl_rt not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] openblas_lapack_info: [DEBUG ] libraries openblas not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] openblas_clapack_info: [DEBUG ] libraries openblas,lapack not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] flame_info: [DEBUG ] libraries flame not found in ['/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib', '/usr/local/lib', '/usr/lib'] [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] atlas_3_10_threads_info: [DEBUG ] Setting PTATLAS=ATLAS [DEBUG ] libraries lapack_atlas not found in /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib [DEBUG ] libraries tatlas,tatlas not found in /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib [DEBUG ] libraries lapack_atlas not found in /usr/local/lib [DEBUG ] libraries tatlas,tatlas not found in /usr/local/lib [DEBUG ] libraries lapack_atlas not found in /usr/lib [DEBUG ] libraries tatlas,tatlas not found in /usr/lib [DEBUG ] <class 'numpy.distutils.system_info.atlas_3_10_threads_info'> [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] atlas_3_10_info: [DEBUG ] libraries lapack_atlas not found in /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib [DEBUG ] libraries satlas,satlas not found in /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib [DEBUG ] libraries lapack_atlas not found in /usr/local/lib [DEBUG ] libraries satlas,satlas not found in /usr/local/lib [DEBUG ] libraries lapack_atlas not found in /usr/lib [DEBUG ] libraries satlas,satlas not found in /usr/lib [DEBUG ] <class 'numpy.distutils.system_info.atlas_3_10_info'> [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] atlas_threads_info: [DEBUG ] Setting PTATLAS=ATLAS [DEBUG ] libraries lapack_atlas not found in /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib [DEBUG ] libraries ptf77blas,ptcblas,atlas not found in /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib [DEBUG ] libraries lapack_atlas not found in /usr/local/lib [DEBUG ] libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib [DEBUG ] libraries lapack_atlas not found in /usr/lib [DEBUG ] libraries ptf77blas,ptcblas,atlas not found in /usr/lib [DEBUG ] <class 'numpy.distutils.system_info.atlas_threads_info'> [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] atlas_info: [DEBUG ] libraries lapack_atlas not found in /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib [DEBUG ] libraries f77blas,cblas,atlas not found in /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib [DEBUG ] libraries lapack_atlas not found in /usr/local/lib [DEBUG ] libraries f77blas,cblas,atlas not found in /usr/local/lib [DEBUG ] libraries lapack_atlas not found in /usr/lib [DEBUG ] libraries f77blas,cblas,atlas not found in /usr/lib [DEBUG ] <class 'numpy.distutils.system_info.atlas_info'> [DEBUG ] NOT AVAILABLE [DEBUG ]
[DEBUG ] FOUND: [DEBUG ] extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers'] [DEBUG ] extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] [DEBUG ] define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)] [DEBUG ]
[DEBUG ] /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros' [DEBUG ] warnings.warn(msg) [DEBUG ] running dist_info [DEBUG ] running build_src [DEBUG ] build_src [DEBUG ] building py_modules sources [DEBUG ] creating build [DEBUG ] creating build/src.macosx-11.2-x86_64-3.9 [DEBUG ] creating build/src.macosx-11.2-x86_64-3.9/numpy [DEBUG ] creating build/src.macosx-11.2-x86_64-3.9/numpy/distutils [DEBUG ] building library "npymath" sources [DEBUG ] Could not locate executable gfortran [DEBUG ] Could not locate executable f95 [DEBUG ] Could not locate executable f90 [DEBUG ] Could not locate executable f77 [DEBUG ] Could not locate executable xlf90 [DEBUG ] Could not locate executable xlf [DEBUG ] Could not locate executable ifort [DEBUG ] Could not locate executable ifc [DEBUG ] Could not locate executable g77 [DEBUG ] Could not locate executable g95 [DEBUG ] Could not locate executable pgfortran [DEBUG ] don't know how to compile Fortran code on platform 'posix' [DEBUG ] Traceback (most recent call last): [DEBUG ] File "/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in [DEBUG ] main() [DEBUG ] File "/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main [DEBUG ] json_out['return_val'] = hook(hook_input['kwargs']) [DEBUG ] File "/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel [DEBUG ] return hook(metadata_directory, config_settings) [DEBUG ] File "/private/tmp/pip-build-env-vnua4vfz/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 157, in prepare_metadata_for_build_wheel [DEBUG ] self.run_setup() [DEBUG ] File "/private/tmp/pip-build-env-vnua4vfz/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 248, in run_setup [DEBUG ] super(_BuildMetaLegacyBackend, [DEBUG ] File "/private/tmp/pip-build-env-vnua4vfz/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 142, in run_setup [DEBUG ] exec(compile(code, file, 'exec'), locals()) [DEBUG ] File "setup.py", line 508, in [DEBUG ] setup_package() [DEBUG ] File "setup.py", line 500, in setup_package [DEBUG ] setup(metadata) [DEBUG ] File "/private/tmp/pip-install-i0bt0k4v/numpy/numpy/distutils/core.py", line 169, in setup [DEBUG ] return old_setup(new_attr) [DEBUG ] File "/private/tmp/pip-build-env-vnua4vfz/overlay/lib/python3.9/site-packages/setuptools/init.py", line 165, in setup [DEBUG ] return distutils.core.setup(attrs) [DEBUG ] File "/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/distutils/core.py", line 148, in setup [DEBUG ] dist.run_commands() [DEBUG ] File "/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/distutils/dist.py", line 966, in run_commands [DEBUG ] self.run_command(cmd) [DEBUG ] File "/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/distutils/dist.py", line 985, in run_command [DEBUG ] cmd_obj.run() [DEBUG ] File "/private/tmp/pip-build-env-vnua4vfz/overlay/lib/python3.9/site-packages/setuptools/command/dist_info.py", line 31, in run [DEBUG ] egg_info.run() [DEBUG ] File "/private/tmp/pip-install-i0bt0k4v/numpy/numpy/distutils/command/egg_info.py", line 24, in run [DEBUG ] self.run_command("build_src") [DEBUG ] File "/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/distutils/cmd.py", line 313, in run_command [DEBUG ] self.distribution.run_command(command) [DEBUG ] File "/Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/distutils/dist.py", line 985, in run_command [DEBUG ] cmd_obj.run() [DEBUG ] File "/private/tmp/pip-install-i0bt0k4v/numpy/numpy/distutils/command/build_src.py", line 144, in run [DEBUG ] self.build_sources() [DEBUG ] File "/private/tmp/pip-install-i0bt0k4v/numpy/numpy/distutils/command/build_src.py", line 155, in build_sources [DEBUG ] self.build_library_sources(libname_info) [DEBUG ] File "/private/tmp/pip-install-i0bt0k4v/numpy/numpy/distutils/command/build_src.py", line 288, in build_library_sources [DEBUG ] sources = self.generate_sources(sources, (lib_name, build_info)) [DEBUG ] File "/private/tmp/pip-install-i0bt0k4v/numpy/numpy/distutils/command/build_src.py", line 378, in generate_sources [DEBUG ] source = func(extension, build_dir) [DEBUG ] File "numpy/core/setup.py", line 663, in get_mathlib_info [DEBUG ] raise RuntimeError("Broken toolchain: cannot link a simple C program") [DEBUG ] RuntimeError: Broken toolchain: cannot link a simple C program [DEBUG ] ---------------------------------------- [DEBUG ] ERROR: Command errored out with exit status 1: /Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/python3.9 /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp5tz_l874 Check the logs for full command output. [DEBUG ] WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available. [DEBUG ] You should consider upgrading via the '/Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/python3.9 -m pip install --upgrade pip' command. [DEBUG ] ---------------------------------------- [DEBUG ] ERROR: Command errored out with exit status 1: /Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/python3.9 /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-dlqinc5j/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_machine != '"'"'aarch64'"'"'' 'numpy==1.19.3; python_version>='"'"'3.6'"'"' and sys_platform == '"'"'linux'"'"' and platform_machine == '"'"'aarch64'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_machine != '"'"'aarch64'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_machine != '"'"'aarch64'"'"'' 'numpy==1.19.3; python_version>='"'"'3.9'"'"' and platform_machine != '"'"'aarch64'"'"'' Check the logs for full command output. [DEBUG ] WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available. [DEBUG ] You should consider upgrading via the '/Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/python3.9 -m pip install --upgrade pip' command. [DEBUG ] Exception in thread background thread for pid 9684: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 865, in run self._target(self._args, *self._kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sh.py", line 1539, in wrap fn(args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sh.py", line 2458, in background_thread handle_exit_code(exit_code) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sh.py", line 2156, in fn return self.command.handle_command_exit_code(exit_code) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sh.py", line 814, in handle_command_exit_code raise exc sh.ErrorReturnCode_1:

RAN: /Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/pip3 install --isolated --prefix /Users/emre/Documents/kivy-ios-master/dist/root/python3 opencv-python

STDOUT: Collecting opencv-python Using cached opencv-python-4.5.1.48.tar.gz (88.3 MB) Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: /Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/python3.9 /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-dlqinc5j/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_machine != '"'"'aarch64'"'"'' 'numpy==1.19.3; python_version>='... (15515 more, please see e.stdout)

STDERR:

Traceback (most recent call last): File "toolchain.py", line 3, in main() File "/Users/emre/Documents/kivy-ios-master/kivy_ios/toolchain.py", line 1534, in main ToolchainCL() File "/Users/emre/Documents/kivy-ios-master/kivy_ios/toolchain.py", line 1291, in init getattr(self, args.command)() File "/Users/emre/Documents/kivy-ios-master/kivy_ios/toolchain.py", line 1493, in pip _pip(sys.argv[2:]) File "/Users/emre/Documents/kivy-ios-master/kivy_ios/toolchain.py", line 1178, in _pip shprint(pip_cmd, *args, _env=pip_env) File "/Users/emre/Documents/kivy-ios-master/kivy_ios/toolchain.py", line 55, in shprint for line in cmd: File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sh.py", line 862, in next self.wait() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sh.py", line 791, in wait self.handle_command_exit_code(exit_code) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sh.py", line 814, in handle_command_exit_code raise exc sh.ErrorReturnCode_1:

RAN: /Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/pip3 install --isolated --prefix /Users/emre/Documents/kivy-ios-master/dist/root/python3 opencv-python

STDOUT: Collecting opencv-python Using cached opencv-python-4.5.1.48.tar.gz (88.3 MB) Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: /Users/emre/Documents/kivy-ios-master/dist/hostpython3/bin/python3.9 /Users/emre/Documents/kivy-ios-master/dist/hostpython3/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-dlqinc5j/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_machine != '"'"'aarch64'"'"'' 'numpy==1.19.3; python_version>='... (15515 more, please see e.stdout)

STDERR:

emres-Air:kivy-ios-master emre$