0

when i type pyton on the terminal , i get the following:

Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:32:06) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

but when i run a python script i got the following:

WARNING: python-gevent not installed. `curl -k -L http://git.io/I9B7RQ|sh`
------------------------------------------------------
GoAgent Version    : 2.1.9 (python/2.7.2 gevent/None pyopenssl/0.13)
Listen Address     : 127.0.0.1:8087
GAE Mode           : https
GAE Profile        : google_hk
GAE APPID          : goagent
Pac Server         : http://127.0.0.1:8086/proxy.pac
------------------------------------------------------

what should i configure to let the script using the right version python, cause when i try to install gevent, it told i already have it.

0

Two ways you can do this.

First, you can call the script explicitly, using the python you want. To determine which python bin is being used, you can type:

which python

This will give you the full path to the python being used when you type python at the command line.

In any case, you can just type:

python script_name_here

Or you can use the full path to your python and do the same.

The second way is to edit your script, and edit the shebang line to point to the python returned by which python. In other words, edit the script you're running and change the first line to something like:

#!/path/to/python2.7.3

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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