2 Newbie questions.
Sibylle Koczian
Sibylle.Koczian at Bibliothek.Uni-Augsburg.de
Thu Oct 7 09:25:51 EDT 2004
More information about the Python-list mailing list
Thu Oct 7 09:25:51 EDT 2004
- Previous message (by thread): 2 Newbie questions.
- Next message (by thread): 2 Newbie questions.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steven Bethard schrieb: > Len Sumnler <pcslen <at> comcast.net> writes: > >>I have searched the net and performed chmod +x mypython.py and added as the >>first line of my program #!/usr/bin/env python. When I try to run the >>program as follows $ mypython.py I get the error message of, "bash: >>mypython.py: command not found". What am i doing wrong. > > > Not really a Python question, but maybe I can help anyway. A couple of things > to check: > > 1) Does "/usr/bin/env python" work at the shell prompt? If not you probably > don't have python on your path. > > 2) If "/usr/bin/env python" does work for you from the shell, did you create > mypython.py on a Windows machine? I've gotten these errors occasionally when > moving a script from a Windows box to a Unix box because the shell doesn't > like the \r's that Windows puts at the end of lines. You could try using > dos2unix or a similar script to remove these. > 3) I think it must be ./mypython.py - the script isn't automatically searched for in the current directory. But it's quite right that this is a unix/linux and not a Python question. Sibylle -- Dr. Sibylle Koczian Universitaetsbibliothek, Abt. Naturwiss. D-86135 Augsburg Tel.: (0821) 598-2400, Fax : (0821) 598-2410 e-mail : Sibylle.Koczian at Bibliothek.Uni-Augsburg.DE
- Previous message (by thread): 2 Newbie questions.
- Next message (by thread): 2 Newbie questions.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list