clockworkpi

Python on Gameshell

Hey,
So I am trying to install python onto my gameshell, however every time I try I get the following error:

apt-listchanges: Can’t set locale; make sure $LC_* and $LANG are correct!
apt-listchanges: Reading changelogs…
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
Can’t exec “locale”: No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
Extracting templates from packages: 100%
Preconfiguring packages …
dpkg: warning: ‘ldconfig’ not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root’s PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)

Any ideas?
Thanks.

Hello,

First, the GameShell comes with Python 2.7 already installed, you don’t need to install it…

Second, It will help by providing what you are doing to get that output. Are you trying to install using apt-get? using dpkg on a downloaded package (.deb)? manually from a downloaded archive file (.zip, .tar.gz, etc)?

Ah sorry my bad (I probably should have mentioned I am very new to this).
Well I’m trying to update the python to 3.7 so I can attempt to put my python game onto it (consists of arcade). Anyhow, the previously mentioned outcome was a result of me running this:
sudo apt-get -t testing install -y python3.7

You wouldn’t happen to know how to get a python game onto the gameshell by any chance?
Thanks

Does your game only work with python 3.7? pygame is also already installed on the GameShell. In fact, the entire UI (launcher) is made using python and pygame.

The easiest way to get something running on the GameShell is to put a folder into ~/apps/Menu and place your software / game into it. In addition, include a script (.sh file) that has the same name as the folder, that runs your software / game.

Example, a folder called Foobar should contain a file called Foobar.sh which contains shell script to launch your application.

This may help https://github.com/Cecilectomy/Alex4_GameSH
It is a launcher for a game called Alex4. It doesn’t actually contain any of the game binaries or assets, it just installs the game if it isn’t already, and the .sh file launches it.

1 Like

Thank you. I’ll give it a go.

I am very new to Gameshell (just built mine an hour ago) but when it comes to Python you should always be using something like ‘conda’ to package your Python installation and libraries so you dont screw up the global Python install. Is that available for the Gameshell? I hope so…

I supposed that you would pack this script with the commands needed to setup the environment for using the ‘conda’ installation of your Python of choice e.g. version 3.7

It looks like conda is a no-go on Arm, bummer.

I found some alternative ideas here: https://gist.github.com/simoncos/a7ce35babeaf73f512be24135c0fbafb

Can also try BerryConda