Closed buxel closed 3 years ago
I searched a little bit. This seems not a problem with Heroic. Furthermore your Python configuration isn't correct, so it can't find the standard Python modules. At least PYTHONPATH or sys.path should point to your site-packages or script folder inside the python installation. This are the folders were python searches for modules.
E.g. my sys.path contains this paths, but yours not:
Maybe im wrong here and heroic or proton does set this paths by itself and can't find the site-package folders ? Can you do the same as i did in the terminal and check if the sys.path contains the necessary paths. If not than search in the internet how to add them. Else it is really a problem with heroic/proton or what ever triggers python there.
I expected all dependencies to be managed by the package manager when installing the .rpm. Having to install a global package afterwards seems unusual, that's why I suspected some dependency might be missing in the package setup and created this issue. The system setup is quite new and clean and I did not meddle with any python configuration. How is the environment set up for heroic? I have never done packaging myself but I guess you must somehow be shipping other python packages as well. Couldn't it be included there? Otherwise any other system which does not have this package installed by default (or coincidence) will run into this issue.
I also have no experience with rpm packages. For me it looks like that the python configuration of the system is used to setup an enviroment where special dependencies are installed later (via pip). Also encodings is a standard module from python and will be copied from the local python to the virtual enviroment.
Can you please check if sys.path contains the necessary paths. If not your local python is broken and therefore also a python virtual enviroment.
You can also check if you can import encodings without errors:
If everything is fine, then it is a problem with heroic, legendary or proton. I don't think heroic is creating the enviroment, but not 100% sure. Could be proton instead.
The OpenSUSE Python packages are incompatible with Legendary. Please use a compatible version. This is the error you're getting.
Closing as this is not a Heroic issue.
@Nocccer thanks for your help. i can import the module on my system like you did:
@adityaruplaha could you please elaborate? is it a conflict of module versions? shouldn't pip manage python modules independantly of the used distro? It would be great if you could give me some pointers.
I checked legendary repository https://github.com/derrod/legendary. You have the correct python version installed (3.8.x) but maybe the python module request is not installed ?
Heroic is just a gui around legendary and this is a problem of legendary, so maybe open your problem there?
@buxel try to install Legendary standalone. If it works, please provide the output. In that case we'll have to look into what happened. If it doesn't, Legendary is incompatible, nothing we can do about it.
Also side note, never use pip to update global Python packages. Use your distros package manager.
It is an issue with legendary, as you suspected. Running it directly gives the same error. Thanks for checking, though! :+1:
I too faced this issue, the fix was to add the directory(ies) containing the missing module(s) to pythonpath.
In my case it was /usr/lib/python3.8/site-packages/feedparser/
and /usr/lib64/python3.8/
.
You can find these with $ find /usr/ -name modulename.py
Had the same issue after moving to Tumbleweed, so only to make it clear:
export PYTHONPATH=$PYTHONPATH:/usr/bin/python:/usr/lib/python3.8/site-packages:/usr/lib64/python3.8/ /opt/Heroic/heroic
then using proton works.
Ofc its better to export this variable as a global one, so you don't need to call heroic from the terminal everytime.
I'm testing with the Heroic 2.0.0 AppImage and getting the same issue on Mageia 9, RPM-based.
python3 -c "import encodings"
works fine.
I don't have PYTHONPATH
defined, and don't need to usually to run Python application (whether distro packages, pip installed, or in a venv).
My system Python is Python 3.9.8, but the log below refers to /opt/hostedtoolcache/Python/3.9.9/
which I guess is a virtual filesystem bundled into the legendary
bin?
Example log from attempting to run Limbo with Proton Experimental from Steam:
Edit: I tested two other legendary
versions and they work well:
pip install legendary-gl
So the problem seems to be specific to the bundled version in the Heroic distribution. I tested both the AppImage and the .tar.xz
portable build and both have the same issue when using resources/app.asar.unpacked/build/bin/linux/legendary
.
Describe the bug After installing heroic-1.5.7.x86_64.rpm on OpenSuse, it fails to launch any games. It looks like a python dependency is missing.
To Reproduce Steps to reproduce the behavior:
Desktop (please complete the following information):