title: pip install / pytz versioning conflict?
body: <p>I ran <code>pip install protobuf==2.6.1</code> as part of a project's <code>install</code> script on an Ubuntu 12.04 VM. This yields the following error: </p>
  
  <pre>
  Collecting protobuf==2.6.1
  /usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
    InsecurePlatformWarning
    Downloading protobuf-2.6.1.tar.gz (188kB)
      100% |################################| 188kB 2.5MB/s 
      Complete output from command python setup.py egg_info:
  
      Installed /tmp/pip-build-AnwMIr/protobuf/.eggs/google_apputils-0.4.2-py2.7.egg
      Traceback (most recent call last):
        File "", line 20, in 
        File "/tmp/pip-build-AnwMIr/protobuf/setup.py", line 200, in 
          "Protocol Buffers are Google's data interchange format.",
        File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
          _setup_distribution = dist = klass(attrs)
        File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 268, in __init__
          self.fetch_build_eggs(attrs['setup_requires'])
        File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 313, in fetch_build_eggs
          replace_conflicting=True,
        File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 836, in resolve
          dist = best[req.key] = env.best_match(req, ws, installer)
        File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1074, in best_match
          dist = working_set.find(req)
        File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 711, in find
          raise VersionConflict(dist, req)
      pkg_resources.VersionConflict: (pytz 2011k (/usr/lib/python2.7/dist-packages), Requirement.parse('pytz>=2010'))
  </pre>
  
  <p>Using <code>pip install -r requirements.txt</code> yields the same error.</p>
  
  <p>I have <code>pip 7.1.2</code>, and have <code>protobuf 2.6.1</code> on other Ubuntu 12.04 VMs with similar (not identical) lists of installed packages. Pip freeze says <code>pytz===2011k</code>. (Note the <em>triple</em> equals.)</p>
  
  <p><code>pip-conflict-checker</code> reports only one conflict, seemingly unrelated to both <code>pytz</code> and <code>protobuf</code>:</p>
  
  <pre><code>$ pipconflictchecker
  --------------------------------------------------
   Conflicts Detected
  --------------------------------------------------
   - python-dateutil(2.1) pandas(&lt;2)
  </code></pre>
  
  <p>Why is pip flagging <code>pytz===2011k</code> and <code>pytz&gt;=2010</code> as being in conflict?</p>
  
  <p>I would like to list all my pip requirements in a single "requirements.txt". Is there a way to do this without triggering the above error? I have no explicit, direct requirements on <code>pytz</code> itself.</p>
  
  <p>I was also able to get <code>protobuf</code> to install with an explicit <code>pip install 2012b0</code>, but <strong>not</strong> using <code>pip install -r requirements.txt</code> for a requirements.txt with both <code>protobuf==2.6.1</code> and <code>pytz&gt;=2015</code>.</p>
  
  <p>Potentially-relevant links:</p>
  
  <ul>
  <li>Deprecated pytz versioning workaround: <a href="https://bugs.launchpad.net/pytz/+bug/1224858" rel="nofollow noreferrer">https://bugs.launchpad.net/pytz/+bug/1224858</a></li>
  <li>Example of a straightforward VersionConflict and pip conflict checker: <a href="https://github.com/docker/compose/issues/918" rel="nofollow noreferrer">https://github.com/docker/compose/issues/918</a></li>
  <li>PEP 440 / Python versioning <a href="https://www.python.org/dev/peps/pep-0440" rel="nofollow noreferrer">https://www.python.org/dev/peps/pep-0440</a> Includes special note for pytz versions <a href="https://www.python.org/dev/peps/pep-0440/#olson-database-versioning" rel="nofollow noreferrer">https://www.python.org/dev/peps/pep-0440/#olson-database-versioning</a> and description of the '===' <a href="https://www.python.org/dev/peps/pep-0440/#arbitrary-equality" rel="nofollow noreferrer">https://www.python.org/dev/peps/pep-0440/#arbitrary-equality</a></li>
  <li>pip development thread on dependency checking / resolution <a href="https://github.com/pypa/pip/issues/988" rel="nofollow noreferrer">https://github.com/pypa/pip/issues/988</a></li>
  </ul>