Results 1 to 1 of 1

Thread: Python site-packages directory

  1. #1

    Default Python site-packages directory

    EDIT: Sorry, I realize that "other forums / development" is a better place for this. I have reposted there.

    I'm writing a python package that uses a compiled library. Because the lib needs to be compiled for the different py versions, I want to put it in the site-packages subfolder that the rest of the package will reside in. But a python script needs to know the full path of the lib in order to access it.

    The problem is that the default install directory for opensuse is:


    But I don't know a way to programmatically get this path either during packaging (to make sure the lib goes there) or at runtime (to access the lib correctly). distutils.sysconfig.get_python_lib() returns:


    So I have been hard coding the install path. But I'm hoping there is a better way. Any suggestions?
    Last edited by code-breaker; 25-Mar-2011 at 11:03. Reason: Found a better forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts