Question

I was trying to install the module ConfigObj. I did everything correctly

Typed in CMD:

python setup.py install

But tells me a traceback (error)

> C:\Users\Frederik\Desktop\configobj-4.7.2>python setup.py install
> Traceback (most recent call last):   File "setup.py", line 13, in
> <module>
>     from configobj import __version__ as VERSION   File "C:\Users\Frederik\Desktop\configobj-4.7.2\configobj.py", line 1644
>     except Exception, e:
>                     ^ SyntaxError: invalid syntax
> 
> C:\Users\Frederik\Desktop\configobj-4.7.2>

Can everyone tell me how to fix this, there shouldn't be an error in the configobj.py i've installed it before on a another computer.

Downloaded the module from here: https://pypi.python.org/pypi/configobj

My operating system is Windows 7

Was it helpful?

Solution

configObj is for python 2 only.

I should elaborate.

the module you are trying to install is using a syntax that was dropped in python 3. it is available in python 2 up to 2.7.5 (current). As the error is showing perfectly valid python 2 as a syntax error, one must conclude that you are using python 3, and the module does not support python 3. Also, the Pypi link only lists python 2 versions in its categories.

Downgrade your python, or port the module to python 3

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top