Read the Docs: Distutils2 error during installation
<p>I try to install local instance of Read the Docs on my Win10</p>

<p>When I follow this documentation:<br>
<a href="http://docs.readthedocs.io/en/latest/install.html" rel="nofollow">http://docs.readthedocs.io/en/latest/install.html</a></p>

<p>and type:</p>

<pre><code>pip install -r requirements.txt
</code></pre>

<p>I get this error:</p>

<pre><code>Collecting Distutils2==1.0a3 (from -r requirements/pip.txt (line 65))
  Using cached Distutils2-1.0a3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "&lt;string&gt;", line 1, in &lt;module&gt;
      File "C:\Users\USER\AppData\Local\Temp\pip-build-xseiavup\Distutils2\setup.py", line 9, in &lt;module&gt;
        from distutils2.util import find_packages
      File "C:\Users\USER\AppData\Local\Temp\pip-build-xseiavup\Distutils2\distutils2\util.py", line 174
        except KeyError, var:
                       ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\USER\AppData\Local\Temp\pip-build-xseiavup\Distutils2\
</code></pre>

<p>Anyone know this error?</p>

<p>My pip version: 8.1.2;<br>
python: 3.5</p>

<p>Is it possible you are running the Python 2 <code>pip</code>? The error message clearly indicates that the code is being executed under Python 3 but has Python 2 syntax. Do you get better results with</p>

<pre><code>python -m pip install -r requirements.txt
</code></pre>

<p>I wonder? If not then verify that</p>

<pre><code>python
</code></pre>

<p>runs version 3.5 ...</p>

<p>Oh. I just checked and the <a href="https://pypi.python.org/pypi/Distutils2/1.0a4" rel="nofollow">disutils2 page on PyPI</a> says</p>

<p><strong>Distutils2 development is stopped.</strong></p>

<p>tl;dr: keep using setuptools and pip for now, donât use distutils2.</p>

<p>It looks like there was never a Python 3 version. Looks like you might need to update your code.</p>

python read-the-docs