Python Syntax Error | Change Python Version

Jasper Frumau jasperfrumau at gmail.com
Fri Mar 29 04:19:44 PDT 2013


Tried to add AWS Beanstalk to $PATH using

jaspersmbp:~ jasper$ export
PATH=$PATH:/Users/jasper/awsbeanstalk/eb/macosx/python2.7

and it worked.

echo $PATH
/Users/jasper/.rvm/gems/ruby-1.8.7-p370/bin:/Users/jasper/.rvm/gems/ruby-1.8.7-p370 at global
/bin:/Users/jasper/.rvm/rubies/ruby-1.8.7-p370/bin:/Users/jasper/.rvm/bin:/opt/local/bin:opt/local/sbin:/opt/subversion/bin:/opt/local/apache2/bin/:/opt/local/lib/python2.4/site-packages/django/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/jasper/.rvm/bin:/Users/jasper/awsbeanstalk/eb/macosx/python2.7

But now when I run it from the server folder /opt/local/www/awswp  I see

eb init
Traceback (most recent call last):
  File "/Users/jasper/awsbeanstalk/eb/macosx/python2.7/eb", line 17, in
<module>
    from scli import core
  File "/Users/jasper/awsbeanstalk/eb/macosx/python2.7/scli/core.py", line
24, in <module>
    from scli import command, cli_parse, config_file, prompt
  File "/Users/jasper/awsbeanstalk/eb/macosx/python2.7/scli/command.py",
line 17, in <module>
    from scli.resources import CommandType
  File "/Users/jasper/awsbeanstalk/eb/macosx/python2.7/scli/resources.py",
line 17, in <module>
    from lib.utility import misc
  File
"/Users/jasper/awsbeanstalk/eb/macosx/python2.7/lib/utility/misc.py", line
22, in <module>
    from scli.constants import OSSpecific, ServiceDefault, TerminalConstant
  File "/Users/jasper/awsbeanstalk/eb/macosx/python2.7/scli/constants.py",
line 225
    TomcatAppContainer,
                      ^
SyntaxError: invalid syntax

I run Python 2.6.8 /
which python
/opt/local/bin/python

and it seems it might help if I use 2.7 How can I switch?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20130329/c7282c0b/attachment.html>


More information about the macports-users mailing list