Correct way to install Thonny IDE in Fatdog?

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
Neo_78
Posts: 351
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 190 times
Been thanked: 9 times

Correct way to install Thonny IDE in Fatdog?

Post by Neo_78 »

I am trying o install the Thonny IDE for Python and MicroPython development:

https://thonny.org/

As the root user, I first tried the suggested installation script with curl -s https://thonny.org/installer-for-linux as suggested in the instructions:

https://github.com/thonny/thonny/wiki/Linux

However, this throws the following error:

Code: Select all

Can't offer alternatives as your system doesn't seem to have usable Python interpreter.

I then installed python3 from Gslapt, tried the script again, but get the same error.

I then tried the alternative installation method and downloaded the latest tar.gz version:

https://github.com/thonny/thonny/releas ... _64.tar.gz:

Code: Select all

tar -zxvf thonny-4.1.4-x86_64.tar.gz
> cd thonny
> ./install

This will create the Thonny icon in the menu and I can start the IDE. However, if I switch to a normal, non-root user, I am not able the start the IDE any longer and the menu item is broken.

Could you please guide me how to correctly install Thonny and make it available for all standard users?

Thank you! :thumbup:

step
Posts: 510
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 50 times
Been thanked: 179 times
Contact:

Re: Correct way to install Thonny IDE in Fatdog?

Post by step »

Neo_78 wrote: Wed Mar 20, 2024 10:14 pm

[...]
I then tried the alternative installation method and downloaded the latest tar.gz version:
[...]

Code: Select all

> cd thonny
./install

This will create the Thonny icon in the menu and I can start the IDE. However, if I switch to a normal, non-root user, I am not able the start the IDE any longer and the menu item is broken.

I don't know Thonny. I just read their alternative installation instructions https://github.com/thonny/thonny/wiki/L ... ion-method. They imply that you can either install as the current user to the apps folder in the user's home directory, or install as root to a given folder by specifying the folder path. That's what they say, perhaps not so explicitly, but the meaning is there.

It looks like you installed as the current user (root) to the apps folder in root's home directory (/root). So, is Thonny installed in /root/apps/thonny now? If so, no wonder a non-root user can't read/write files in root's home directory.

My guess is that you should reinstall Thonny to a folder accessible to all users by following the second example linked above. For instance -- they say -- to install thonny under /opt run sudo ./install /opt to get /opt/thonny. Optionally, append Thonny's binary folder to the PATH variable in /etc/profile. Add PATH=$PATH:ThePath, after the line that sets PATH in /etc/profile, where ThePath stands for the correct path of Thommy's binary folder. If you don't do the PATH thing, a non-root user should be able to start the program by typing the whole path to the Thonny program file.

Post Reply

Return to “Software”