Question

When a package is installed from a repository, pip freeze yields a repository path for that package rather than a package name/version. Example:

-e git+https://github.com/ryneeverett/Python-Markdown.git@11f0b010395a86eac93db0816bcf984639b839e9#egg=Markdown-master

When such a package is required by another application, it seems to be unrecognized. Example:

$ hyde gen
Traceback (most recent call last):
  File "/home/ryne/.virtualenvs/DEV/bin/hyde", line 5, in <module>
    from pkg_resources import load_entry_point
  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2675, in <module>
    def extras(self):
  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 552, in resolve
    if item not in self.entry_keys:
pkg_resources.DistributionNotFound: Markdown==2.3.1

How should such issues be avoided?

Was it helpful?

Solution

I can't confirm if this would have solved my ancient issue, but (having looked through pip's source code) I'm pretty certain of what the problem was:

I was installing from git because I wanted the latest development version plus my modifications. Hyde (a rarely maintained third party package) pinned the markdown version, which was almost certainly several releases behind. So the problem was that the markdown version specified in the setup.py of my fork was not in fact 2.3.1.

To quote my own answer to another question:

Pip decides whether a requirement is met solely based on the version number (in setup.py).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top