Solved

python shebang line

Posted on 2004-08-06
2
1,067 Views
Last Modified: 2008-01-09
I want to run a simple Python script, but I keep getting bad interpreter.  I've tried this:

#!/usr/bin
python mypythonscript

...as well as this...
#!/usr/bin
python mypythonscript

...as well as this...

#!/System/Library/Frameworks/Python.framework/Versions/2.3/bin/python
python mypythonscript

What am I missing?

Thanks
je

0
Comment
Question by:jesterepsilon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Expert Comment

by:ramrom
ID: 11740496
Platform?
Evidence?
Symptoms?
0
 
LVL 9

Accepted Solution

by:
rjkimble earned 500 total points
ID: 11740557
The shebang line is the first line in the script. It should be something like this:

#!/usr/bin/python

or this:

#!/usr/bin/env python

0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A set of related code is known to be a Module, it helps us to organize our code logically which is much easier for us to understand and use it. Module is an object with arbitrarily named attributes which can be used in binding and referencing. …
Flask is a microframework for Python based on Werkzeug and Jinja 2. This requires you to have a good understanding of Python 2.7. Lets install Flask! To install Flask you can use a python repository for libraries tool called pip. Download this f…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question