The Screenshot Functions don't seem to be working on my machine.
I already have the requested packages installed:
To my understanding, there's no need to the python3-dev
, since Arch already has the dev headers within the python3
package.
Now, to the issue at hand, whenever I attempt to run a Screenshot Function, such as pyautogui.screenshot('$PATH/img.png')
within a script my pointer becomes a Crosshair and I get the following error:
Syntax error near unexpected token "$PATH/img.png"
However, whenever I run the same line from within, I do not know the appropriate name for it but, let's call it Python's Shell. You know, whenever one calls python
from the terminal. It works.
My issue is that, I'd prefer to avoid typing my commands within the Python Shell every time. Any ideas on how to debug this? I'm completely blank at this point, which is why I come here, I couldn't find this specific error online.
Edit: I'm not married to the idea of using pyautogui
for this, if any of you have any ideas for similar tools that work on Arch, I'm all ears!
Thanks to jasonharper's comment I realized that what I was attempting to do was wrong.
My script required a very important first line, the shebang.
#!/path/to/bin/python
Now I may run the python script as I would any other bash script.