kivy-ios .toolchain.py: line 4: syntax error: unexpected end of file in Mac High Sierra

我们两清 提交于 2020-06-16 16:58:33

问题


I try to compile python file to ios file on mac. I used kivy-for-ios documentation. I executed:

brew install autoconf automake libtool pkg-config
brew link libtool
sudo easy_install pip
sudo pip install Cython==0.29.10

git clone git://github.com/kivy/kivy-ios
cd kivy-ios

I also executed this line:

chmod +x ./toolchain.py

because before I got error:

-bash: .toolchain.py: Permission denied

then

./toolchain.py build kivy

the last string returns error:

|from: can not read /var/mail/kivy-ios.toolchain
  .toolchain.py: line 4: syntax error: unexpected end of file

why does it happens and how to fix it? I use python 3.7.5 and I have xcode 10.0.


回答1:


Try using python3 ./toolchain.py build kivy

When you just write ./toolchain.py build kivy it tries to use your default python, which in this case is python2. The toolchain.py scripts requires python3.



来源:https://stackoverflow.com/questions/62360841/kivy-ios-toolchain-py-line-4-syntax-error-unexpected-end-of-file-in-mac-high

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!