Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob.buildout bob.buildout
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bob
  • bob.buildoutbob.buildout
  • Issues
  • #14
Closed
Open
Created Aug 18, 2016 by Manuel Günther@mguentherMaintainer

Cannot specify additional PYTHONPATH inside buildout.cfg

I hope you are doing well with porting all packages to GitLab. As this package is already here, I will add my question/bug here...

Lately, I have seen the need to use OpenCV together with Bob. As I want to have a local installation of everything, I wrote a small script that downloads, compiles and installs OpenCV into a custom directory, say, opencv. Having a look into the opencv directory, I can find the file: opencv/lib/python2.7/dist-packages/cv2.so -- but nothing else is inside that directory.

Indeed, when I use run buildout without specifying any extra path, I can run:

$ PYTHONPATH=opencv/lib/python2.7/dist-packages bin/python
>>> import cv2
>>>

Now, I want to add this additional directory into my buildout.cfg file. I have tried several options of doing that, based on the documentation on PyPI (https://pypi.python.org/pypi/bob.buildout/2.0.13):

  • prefixes = opencv
  • prefixes = opencv/lib
  • prefixes = opencv/lib/python2.7
  • prefixes = opencv/lib/python2.7/dist-packages

PYTHONPATH = opencv/lib/python2.7/dist-packages```

extra-path = opencv/lib/python2.7/dist-packages```

but none of these options helped in order to add the directory into the path variable inside bin/python and, consequently, this doesn't work:

$ ./bin/python
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named cv2

My questions are:

  1. which of the directories should theoretically work for the prefixes option (given that it would work at all). This might also be a nice information to be added to the documentation.
  2. Do I need to write anything else (or create any other file) inside the opencv/lib/python2.7/dist-packages directory in order to make buildout see this directory and include it into the path?

Cheers Manuel

Assignee
Assign to
Time tracking