Python pip upgrade fails with configparser.InterpolationSyntaxError

(Brian Menges) #1

I’m attempting to upgrade pip, setuptools, and wheel in a fresh default python (python3) install using brew. I’ve cleared caches, re-installed countless times, and every time I get the following error:

$ pip3 install --upgrade pip setuptools wheel
Collecting pip
  Using cached pip-10.0.0-py2.py3-none-any.whl
Requirement already up-to-date: setuptools in /usr/local/lib/python3.6/site-packages
Collecting wheel
  Using cached wheel-0.31.0-py2.py3-none-any.whl
Installing collected packages: pip, wheel
  Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
  Rolling back uninstall of pip
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pip/", line 215, in main
    status =, args)
  File "/usr/local/lib/python3.6/site-packages/pip/commands/", line 342, in run
  File "/usr/local/lib/python3.6/site-packages/pip/req/", line 784, in install
  File "/usr/local/lib/python3.6/site-packages/pip/req/", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/local/lib/python3.6/site-packages/pip/req/", line 1064, in move_wheel_files
  File "/usr/local/lib/python3.6/site-packages/pip/", line 247, in move_wheel_files
  File "/usr/local/lib/python3.6/site-packages/pip/", line 141, in distutils_scheme
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/", line 402, in parse_config_files
    val = parser.get(section,opt)
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/", line 800, in get
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/", line 394, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/", line 444, in _interpolate_some
    "found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%{?dist}'
You are using pip version 9.0.3, however version 10.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I can’t figure out how to resolve this – also of note, this prevents me from installing any wheel with the same error message about configparser.

(Brian Menges) #2

seems it might be related to being in a path other than my home directory. I’m using zsh and yadr… and when i reset my shell and go to my HOME directory, I can install python3 modules… is yadr incompatible with python3 ?