title: Pip installing packages incompatible to Python version
body: <p>I'm trying to install numpy using docker, but I get the following error:</p>
  <pre><code> ---&gt; Running in 9f2546faf5d7
  Collecting numpy
    Downloading https://files.pythonhosted.org/packages/c5/63/a48648ebc57711348420670bb074998f79828291f68aebfff1642be212ec/numpy-1.19.4.zip (7.3MB)
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
        File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
        File &quot;/tmp/pip-build-xoiwnjj7/numpy/setup.py&quot;, line 68
          f&quot;NumPy {VERSION} may not yet support Python &quot;
                                                       ^
      SyntaxError: invalid syntax
      
      ----------------------------------------
  Command &quot;python setup.py egg_info&quot; failed with error code 1 in /tmp/pip-build-xoiwnjj7/numpy/
  You are using pip version 8.1.1, however version 20.3.1 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  The command '/bin/sh -c pip3 install numpy' returned a non-zero code: 1
  </code></pre>
  <p>Here is the Dockerfile:</p>
  <pre><code>from ubuntu:16.04
  
  run apt-get update &amp;&amp; apt-get install -y  \
  python3-pip
  
  run pip3 install \
  numpy
  </code></pre>
  <p>The Python version is 3.5.2.
  The issue seems to be that the f-string syntax was only introduced in Python 3.6. It seems weird to me that pip is installing packages that are not compatible with my version of Python, especially since pip apparently doesn't install versions of packages that were released before the installed Python version.
  Is there an easy way to only install versions of packages that work with my version of Python?</p>