ターミナルOS XでPythonスクリプトを実行する

ターミナルOS XでPythonスクリプトを実行する

理由はわかりませんが、端末を介してPythonスクリプトを実行することはできません。

私のスクリプト:

Area.pyの定義

print "Hello World!"
print "Hello Again"
print "I like typing this."
print "This is fun."
print 'Yay! Printing.'
print "I'd much rather you 'not'."
print 'I "said" do not touch this.'

端末:

pik:scripts katja$ python define_regions.py
pik:scripts katja$

どういうわけか実行されず、理由を理解していません。

よろしくお願いします。

編集:Pythonの実行

pik:scripts katja$ python
Python 2.7.6 (default, Sep  9 2014, 15:04:36) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

python -V
Python 2.7.6

pik:scripts katja$ which python
/usr/local/bin/python

編集2

pik:scripts katja$ python ./define_regions.py
pik:scripts katja$ python -c 'import sys; print sys.path'
['', '/usr/local/lib/python2.7/site-packages/setuptools-12.0.5-py2.7.egg', '/usr/local/lib/python2.7/site-packages/pip-6.0.8-py2.7.egg', '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages']
pik:scripts katja$ python -c 'print "test"'
test

ベストアンサー1

おすすめ記事