<p dir="auto">So here's a weird one. I have a Docker container based on debian:stable where I install python3 and python3-pip, and when trying to install requests from a requirements.txt file I get the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Downloading/unpacking requests (from -r /tmp/requirements/xxx.txt (line 2))
  Running setup.py egg_info for package requests

Exception:
Traceback (most recent call last):
  File &quot;/usr/lib/python3/dist-packages/pip/basecommand.py&quot;, line 104, in main
    status = self.run(options, args)
  File &quot;/usr/lib/python3/dist-packages/pip/commands/install.py&quot;, line 245, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File &quot;/usr/lib/python3/dist-packages/pip/req.py&quot;, line 1014, in prepare_files
    req_to_install.assert_source_matches_version()
  File &quot;/usr/lib/python3/dist-packages/pip/req.py&quot;, line 359, in assert_source_matches_version
    version = self.installed_version
  File &quot;/usr/lib/python3/dist-packages/pip/req.py&quot;, line 351, in installed_version
    return self.pkg_info()['version']
  File &quot;/usr/lib/python3/dist-packages/pip/req.py&quot;, line 318, in pkg_info
    data = self.egg_info_data('PKG-INFO')
  File &quot;/usr/lib/python3/dist-packages/pip/req.py&quot;, line 261, in egg_info_data
    data = fp.read()
  File &quot;/usr/lib/python3.2/encodings/ascii.py&quot;, line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8161: ordinal not in range(128)"><pre class="notranslate"><code class="notranslate">Downloading/unpacking requests (from -r /tmp/requirements/xxx.txt (line 2))
  Running setup.py egg_info for package requests

Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 104, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 245, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python3/dist-packages/pip/req.py", line 1014, in prepare_files
    req_to_install.assert_source_matches_version()
  File "/usr/lib/python3/dist-packages/pip/req.py", line 359, in assert_source_matches_version
    version = self.installed_version
  File "/usr/lib/python3/dist-packages/pip/req.py", line 351, in installed_version
    return self.pkg_info()['version']
  File "/usr/lib/python3/dist-packages/pip/req.py", line 318, in pkg_info
    data = self.egg_info_data('PKG-INFO')
  File "/usr/lib/python3/dist-packages/pip/req.py", line 261, in egg_info_data
    data = fp.read()
  File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8161: ordinal not in range(128)
</code></pre></div>
<p dir="auto">However, when I run <code class="notranslate">pip-3.2 install requests</code> directly, it works fine.<br>
I honestly have no idea where even to start on debugging this.</p>
<p dir="auto">The current Requests implementation seems not to work  for https request under proxy.</p>
<p dir="auto">I have posted a question on stackoverflow:</p>
<p dir="auto"><a href="http://stackoverflow.com/questions/13005301/https-proxy-support-in-python-requests-library" rel="nofollow">http://stackoverflow.com/questions/13005301/https-proxy-support-in-python-requests-library</a></p>