2
votes

When i install module configparser on windows 7 using command "pip install ConfigParser", I receive an error:

SyntaxError: invalid syntax

E:\KIENNH\projects\Projs\acs>pip install ConfigParser Downloading/unpacking ConfigParser Downloading configparser-3.3.0r2.tar.gz Running setup.py (path:C:***\ConfigParser\setup.py) egg_info for package ConfigParser Traceback (most recent call last): File "", line 3, in File "C:\Python34\lib\site-packages\setuptools__init__.py", line 5, in import distutils.core File "C:\Python34\lib\distutils\core.py", line 18, in from distutils.config import PyPIRCCommand File "C:\Python34\lib\distutils\config.py", line 7, in from configparser import ConfigParser File "C:***\ConfigParser\configparser.py", line 397 _KEYCRE = re.compile(ur"%(([^)]+))s") ^ SyntaxError: invalid syntax Complete output from command python setup.py egg_info: Traceback (most recent call last):

File "", line 3, in

File "C:\Python34\lib\site-packages\setuptools__init__.py", line 5, in

import distutils.core

File "C:\Python34\lib\distutils\core.py", line 18, in

from distutils.config import PyPIRCCommand

File "C:\Python34\lib\distutils\config.py", line 7, in

from configparser import ConfigParser

File "C:***\configparser.py", line 397

_KEYCRE = re.compile(ur"%\(([^)]+)\)s")

                                     ^

SyntaxError: invalid syntax

Ps: I have found a similar question here, but there no answer!: https://github.com/flyingrub/scdl/issues/8

1

1 Answers

4
votes

configparser is included in the standard library.

https://docs.python.org/3/library/configparser.html

Just use import configparser