ipython/ipython — Issue #1142: Install problems
Author: charlesreid1
Created: 2011-12-11 08:36:35+00:00
State: open

Hi, I'm running into problems while installing. Using a stock Python.org Python 2.7 on Mac OS X snow leopard 10.6.8, I see problems with print() function syntax while running setup.py:

~/pkg/_tarballs/ipython-0.11 $ python setup.py build
File "setup.py", line 32
print(error, file=sys.stderr)
^
SyntaxError: invalid syntax

When I manually change these to remove the ", file=sys.stderr" part (from two print statements), I still run into errors:

~/pkg/_sources/ipython-0.11 $ python setup.py buildTraceback (most recent call last):
File "setup.py", line 54, in
from IPython.utils.path import target_update
File "/Users/charles/pkg/_sources/ipython-0.11/IPython/__init__.py", line 43, in
from .config.loader import Config
File "/Users/charles/pkg/_sources/ipython-0.11/IPython/config/loader.py", line 315
exec compile(open(self.full_filename).read(), self.full_filename, 'exec')
SyntaxError: unqualified exec is not allowed in function '_read_file_as_dict' it contains a nested function with free variables

I can't use the easy_installer, since obviously that uses an incorrect version of Python (2.6, not my Python.org version 2.7). Any help getting ipython working with Python version 2.7 would be appreciated.