I'm trying to hack on the ROS bloom build system (https://github.com/ros-infrastructure/bloom). After I've made some edits, I build it and install it to a virtualenv to test using

python setup.py build
python setup.py install --root /path/to/my/virtualenv

However, once in my virtualenv, it doesn't work since pkg_resources fails to find the module. What am I doing wrong here?

(virtual-bloom)[asinha@localhost  virtual-bloom]$ yolk -l
Python          - 2.7.5        - active development (/usr/lib64/python2.7/lib-dynload)
bloom           - 0.4.4        - active
pip             - 1.3.1        - active
setuptools      - 0.6c11       - active
wsgiref         - 0.1.2        - active development (/usr/lib64/python2.7)
yolk            - 0.4.3        - active
(virtual-bloom)[asinha@localhost  virtual-bloom]$ ./bin/bloom-generate
Traceback (most recent call last):
  File "./bin/bloom-generate", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2805, in <module>
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 696, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 594, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: bloom==0.4.4
(virtual-bloom)[asinha@localhost  virtual-bloom]$ ls
bin  include  lib  lib64  usr
(virtual-bloom)[asinha@localhost  virtual-bloom]$

I'm guessing it's still looking at the system site-packages for some reason. I did use the --no-site-packages flag while creating the virtualenv:

virtualenv virtual-bloom --no-site-packages --verbose
  • 1
    Why not run 'python setup.py install' after your virtualenv is activated? – Jace Browning Jul 31 '13 at 4:08
  • I'm not sure. I was just wondering why pkg_resource doesn't find bloom while yolk does. Installing after activating the virtualenv does indeed work: <pre>virtualenv my-venv source my-venv/bin/activate git clone url-for-bloom cd bloom python setup.py develop ./bin/bloom-generate # make modifications python setup.py develop ./bin/bloom-generate</pre> – FranciscoD Jul 31 '13 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.