When using pip install Twisted in virtualenv on Mac osx 10.9.4, I get this result:
Command \"python setup.py egg_info\" failed with error code 1
I had the same issue on a Mac OSX 10.11.6 in a new virtualenv with a fresh install of Python3.6.1. In my case, I had old versions of the Twisted dependency incremental installed, which prevented the installation.
pip install --upgrade incremental
pip install Twisted
Note I: I was installing a whole array of packages from a requirements file where the same incremental version was specified. I really wonder why the upgrade of incremental helped and have no clue what actually went wrong. If someone can clarify, that would be great.
Note II: Installing incremental ahead of of Twisted seems to be necessary on fresh installs, too [Experienced when working with CentOS7].
Note III: The issue was communicated to the amazing Twisted community and once Twisted ticket #9457 is implemented and in the release this question and my answer should become obsolete.