Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I am new to the Raspberry Pi and Linux. I have seen many tutorials and cannot figure out to run .py files from command line. All i get are error messages about wrong directories and files not found.

share|improve this question

closed as unclear what you're asking by lenik, Milliways, goldilocks Jan 4 at 3:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 3 down vote accepted

You should be able to run a Python script on your Pi by navigating to the directory where your Python file is located, and then typing python scriptname.py.Just type python before your python filename and then it should run the script.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.