Potential conflict between python2 and python3?

38 views
Skip to first unread message

Jean-Sebastien Provost

unread,
Jul 7, 2020, 8:30:59 PM7/7/20
to Kivy users support
Hello experts,

I've created this app that works well in Pycharm as well as in a typical terminal window, but when I try to build it in Xcode, I can't seem to make it work.
When I look at the errors, I have a bunch of errors very similar to this one:

SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
  raise TypeError("%s and %s are not of the same version" (a, b))

And in the log, if I look just above the series of errors, I can see some errors referring to the print statement (print "" vs. print()) which seems to be linked to a conflict between python2.7 and python3.
I am really confused about why it happening since I've installed kivy-ios with the proper instructions given on the webpage. I took the liberty to attach the log.

For the record, I'm using a Macbook Pro with High Sierra, Xcode 10, python 3.7.3 and kivy 1.11. But when I build the recipes "python3, openssl, and kivy" using the toolchain command, I see a lot of references to python3.8. Could it contribute to the error as well? The Touchtracer app seems to work well.
Any ideas? I would appreciate it so much :).
log_error.txt

Robert Flatt

unread,
Jul 7, 2020, 10:06:22 PM7/7/20
to Kivy users support
Not an expert, not a mac user, not a pycharm user, but..... ;)

Consider two different Pythons, the Python the app will use on the target device, and the local Python the build tools are using.

The Python 3.8 is probably the Python on the target device (or would if the target were Android, iOS I don't know)
The "python3" in the recipe refers to the target device python (3.8), not the local Python used by the build tools.

It looks like the build tools are using Python 2, which is not going to work. I get that they are expected to use Python 3.7.1

So this is somthing about how Python or the build tools are installed/configured on the Mac.
One way to create this situation is to install the build tools with Python2 not with Python3.......

ZenCODE

unread,
Jul 9, 2020, 3:03:24 PM7/9/20
to Kivy users support
Looks to me like you might be using a python2 only library in a python3 deployment?

ipaddress?

Perhaps try removing that and see if it works?

Jean-Sebastien Provost

unread,
Jul 9, 2020, 8:19:45 PM7/9/20
to Kivy users support
Originally, I didn't create a virtual environment which I just did. I got a new error, so I'll start another thread.
That being said, I do call the PyMySQL library; maybe this is the culprit.
Thanks ZenCODE!
Reply all
Reply to author
Forward
0 new messages