Scottbg1
Posts: 2
Joined: Mon Jul 10, 2017 5:20 pm

Python problems

Mon May 28, 2018 2:32 am

First post here. My linux kungfu is weak, and I know just enough to get me by, though I have become a master at formatting and reinstalling after I have dumb-thumbed something. So please forgive me if I have missed a usually obvious step.


I am trying to run an app called bCNC on my RPi 3 with Arch and I am not having any luck.
It runs on my Raspian build and after comparing, and I think I have narrowed down the problem as being Tkinter for Python as that is the only dependency that Raspian has that Arch does not.
It doesn't show up in the Arm repos at all and I am not able to install it.

Is my suspicion correct that Tkinter is not available for the Arm version of Arch?

Thanks in advance.

scotty101
Posts: 3235
Joined: Fri Jun 08, 2012 6:03 pm

Re: Python problems

Tue May 29, 2018 5:33 pm

Arch Linux is typically for experienced Linux users.

Tkinter should be installable on Arch either via pip, arch's package manager or from source.

It is installed on Raspbian by default and suitable for Linux noobs.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Scottbg1
Posts: 2
Joined: Mon Jul 10, 2017 5:20 pm

Re: Python problems

Wed May 30, 2018 6:17 pm

scotty101 wrote:
Tue May 29, 2018 5:33 pm
Arch Linux is typically for experienced Linux users.

Tkinter should be installable on Arch either via pip, arch's package manager or from source.

It is installed on Raspbian by default and suitable for Linux noobs.
Thanks Scotty.

I know Arch isn't for the faint of heart, but I'll wager that most Arch gurus were not born with that knowledge, and found their place by trial and error and asking questions like I have here. Yourself included.

So with that, I will post my solution in the event that someone having the same issue might stumble across it and it'll help them out.

First Scotty, I discovered that Arch repos don't have Tkinter named "Tkinter". It doesn't even have 'python' in the title as most other distros do, so that it why I wasn't having any luck finding it. In the Arch repos it is titled just 'tk'. This is true for any fork of Arch linux, not just the ARM repos.
So with that, 'tk' was already installed on my system. Which had to been installed on the original image because I did not install it. Noob luck I guess.

Not having any luck finding help on any of the forums, I decided to just throw caution into the wind and figure it out on my own, even if it meant corrupting the software. I might be a noob, but I feel like I have at least average intelligence. And Linux isn't rocket science. It's just a different language.

I tried starting my python app in terminal and I got a message that it would only run in Python2, which was indeed installed.
So I opened up the start script file, which had a very short list of commands and on a whim I changed one of the commands a bit.
I noticed all of the commands referencing Python, but nothing about Python2, and there was one line that stated.

Code: Select all

PYTHON=python

Knowing what the equal sign USUALLY means, I changed it to

Code: Select all

PYTHON=python2
And viola! Everything was right in the world again.

This was just plain old dumb luck that I fixed it, but sometimes luck is enough.

Have a nice day. :)

Return to “Arch”