scratchattach icon indicating copy to clipboard operation
scratchattach copied to clipboard

How would one go installing this on linux

Open Supremeshiba1717 opened this issue 9 months ago • 4 comments

I want to run a script 24/7 on my raspberry pi 5 and i was wondering how you can get this on raspberry pi OS 64bit

Supremeshiba1717 avatar Apr 04 '25 22:04 Supremeshiba1717

use pip install scratchattach and then create a python file for example script.py. Navigate to its directory then run python3 script.py...I'm assuming you know basic terminal useage? Honestly though, I would reccomend you just go to https://github.com/TimMcCool/scratchattach/wiki/Hosting and get your code hosted for free on someone elses server designed for this

DagriffpatchfanHosting avatar Apr 07 '25 00:04 DagriffpatchfanHosting

If you are gonna use a Raspberry Pi for scratchattach you just need to install using pip

sudo pip install scratchattach -U

If you don't have Python installed install it using APT

sudo apt install python3-full

I am currently on mobile so I cannot type proper code blocks

mas6y6 avatar Apr 10 '25 12:04 mas6y6

python -m pip install scratchattach --break-system-packages --upgrade

uukelele-scratch avatar Apr 11 '25 17:04 uukelele-scratch

pip install scratchattach --break-system-packages --upgrade

That could work too if you installed python using apt

mas6y6 avatar Apr 15 '25 17:04 mas6y6

The best way to do it without messing with system packages is to make a python virtual environment for the script and install scratchattach from there by:

pip install scratchattach

zaid1442011 avatar May 24 '25 08:05 zaid1442011

Why shouldn't it just work using pip normally?

Zaid @.***> schrieb am Sa., 24. Mai 2025, 10:16:

zaid1442011 left a comment (TimMcCool/scratchattach#375) https://github.com/TimMcCool/scratchattach/issues/375#issuecomment-2906618817

The best way to do it without messing with system packages is to make a python virtual environment https://www.w3schools.com/python/python_virtualenv.asp for the script and install scratchattach from there by:

pip install scratchattach

— Reply to this email directly, view it on GitHub https://github.com/TimMcCool/scratchattach/issues/375#issuecomment-2906618817, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCKMZUPBEDABCO6T7XZIPD3AATGFAVCNFSM6AAAAAB2PYM66OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMBWGYYTQOBRG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

TheCommCraft avatar May 24 '25 10:05 TheCommCraft

install portainer on your pi and dockerize the app. I can help you with it on discord if you want.

LIZARD-OFFICIAL-77 avatar May 24 '25 17:05 LIZARD-OFFICIAL-77

install portainer on your pi and dockerize the app. I can help you with it on discord if you want.

that's way too much effort for a simple python library installation.

like I said,

python -m pip install scratchattach --break-system-packages --upgrade

should work out-of-the-box on raspberry pi OS.

uukelele-scratch avatar May 24 '25 17:05 uukelele-scratch

Why not just install it normally?

TheCommCraft avatar May 24 '25 17:05 TheCommCraft

--break-system-packages

That violates PEP

LIZARD-OFFICIAL-77 avatar May 24 '25 17:05 LIZARD-OFFICIAL-77

At least just make a simple dockerfile it can't be that hard

LIZARD-OFFICIAL-77 avatar May 24 '25 17:05 LIZARD-OFFICIAL-77

--break-system-packages

That violates PEP

it's not like scratchattach is a system package or anything. and most people using scratchattach are coming to python for the first time, and I think it'd be easier for them to have the easiest simplest option available

uukelele-scratch avatar May 24 '25 18:05 uukelele-scratch

scratchattach has dependencies like requests which have dependencies that might mix up with system dependencies, especially on a bloated system like PiOS

LIZARD-OFFICIAL-77 avatar May 24 '25 18:05 LIZARD-OFFICIAL-77

Making a dockerfile is easy, just look it up on youtube if it is *that* hard

LIZARD-OFFICIAL-77 avatar May 24 '25 18:05 LIZARD-OFFICIAL-77

bump i need help too

cybersteve547 avatar Jul 06 '25 11:07 cybersteve547

python -m pip install scratchattach

or if that doesn't work

python -m pip install --break-system-packages scratchattach

or if you want to be safe, use docker

TheCommCraft avatar Jul 06 '25 17:07 TheCommCraft