zach-morris / plugin.program.iagl

The Internet Archive Game Launcher (IAGL) will launch Games from the Internet using Kodi
GNU General Public License v3.0
344 stars 49 forks source link

Addon using python instead of explicitly using python3 #235

Closed Norodix closed 2 years ago

Norodix commented 2 years ago

When I tried to install the addon as described in the readme, I got a python.xbmc error for both methods, direct zip file and addon repo.

After reading a lot, I found that the addon requires python 3. I found out that on my system the default python pointed to python 2.

Changing that symlink to python3 solved the problem and I could install the addon. It might be a good idea to call python3 specifically in the code. I have not read it at all, but I assume that is the problem based on the solution.

I hope I could help.

zach-morris commented 2 years ago

python 3 is required for the current version of the addon, which is the version in Kodi v19 and later. If you're system doesn't have python 3 or uses Kodi v18 or earlier, you can use an older version of the addon. See here.

I'm not sure what you've done with symlinks, but that is not required. Use python that is shipped in Kodi.

Norodix commented 2 years ago

I am using xubuntu 18. In most linux distributions that I came across the command "python" is a symlink to a specific version of python installed on the system. /usr/bin/python -> python3 or /usr/bin/python -> python2.7 or something like that. This is sort of the "default" python that the system uses. In case the addon requires python3 explicitly, it would be best to use the python3 command (/usr/bin/python3) which always points to a version of python 3 installed on the system.

For me by default the python pointed to /usr/bin/python2.7 but I also had python3.6 installed which could have been used with python3 command. I had to change the default python link to python3.6 in order to be able to install the addon.

zach-morris commented 2 years ago

I would think that'd be something that has to be set in Kodi. The addon only calls the kodi version required: https://github.com/zach-morris/plugin.program.iagl/blob/main/addon.xml#L4

And kodi takes care of where python is located, not the addon. If xubuntu is calling py2.7 for xbmc.python 3.0 I would say thats a bug.