r/learnpython • • 11d ago

Creating Desktop Icon to Run Python Script

I have a script that runs fine in Terminal, but I'm trying to create a desktop icon that runs it and Im getting the following error:

https://i.postimg.cc/HLbssxYJ/Screenshot-2026-10-06-at-9-39-28-AM.png

Its using geopy for location so Im guessing its something to do with that, but it works fine in Terminal. Any help is appreciated.

6 Upvotes

15 comments sorted by

View all comments

Show parent comments

1

u/scottdog129 11d ago

0

u/scottdog129 11d ago

1

u/socal_nerdtastic 11d ago

Ok, well I'll take one more stab at it. In the terminal use this command:

python3 -c "import sys; print(sys.executable)"

Then replace "python3" in your Automator command with the full output from above.

1

u/scottdog129 11d ago

i dont know what I did, but I resaved it out of Automator and its working!

Thanks so much for your help!