Prachi
Prachi

Reputation: 570

Manually installing python dependencies doesn't work. Why?

Whenever I install my python project using 'python setup.py install', and invoke my project on a CentOS vagrant box, it works great. The dependencies get resolved perfectly.

However, if I create an rpm using fpm for my project, install the rpm using 'rpm -i rpm-file.rpm', manually install the dependencies using 'pip install -r requirements-file-path.txt' and then invoke my project on another CentOS vagrant box, I get the following error:

  File "/usr/bin/<name-of-my-project>", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2655, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: fabric==1.10.2

Uninstalling the dependencies using 'pip uninstall' and reinstalling them doesn't fix the problem. What am I missing?

Upvotes: 1

Views: 288

Answers (1)

Prachi
Prachi

Reputation: 570

Just found the answer on the Fabric FAQ page: http://www.fabfile.org/faq.html/. Executing:

sudo pip install -U setuptools

Then re-installing the dependencies and project solved my problem. But welcome to other answers.

Upvotes: 1

Related Questions