Results 1 to 5 of 5

Thread: [Python] why is site-packages in /usr/local/lib.. ignored in Jaunty?

  1. #1
    Join Date
    Dec 2006
    Beans
    8
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Question [Python] why is site-packages in /usr/local/lib.. ignored in Jaunty?

    Hi there,

    I'm just wondering why "/usr/local/lib/python2.6/site-packages/" is ignored in the python2.6 sys.path while, "/usr/local/lib/python2.5/site-packages/" is included in the python2.5 sys.path (which to my understanding is the standard way things are done)?

  2. #2
    Join Date
    Apr 2006
    Beans
    370

    Re: [Python] why is site-packages in /usr/local/lib.. ignored in Jaunty?

    See https://lists.ubuntu.com/archives/ub...ry/027439.html

    I'd paraphrase here, but I don't really understand the motivation.

  3. #3
    Join Date
    Jul 2008
    Beans
    64

    Re: [Python] why is site-packages in /usr/local/lib.. ignored in Jaunty?

    Some motivation....

    I need to test some applications with multiple versions of Python. I want to keep my test environment (in /usr/local) independent from the standard Ubuntu installation. For example, I have py26 sym-linked to /usr/local/bin/python2.6. When I install my application (which could easily be broken), I don't want to replace the version of the application used by the Ubuntu version.

    It becomes very challenging to fix an intermittent bug when the standard, but broken, version of application suddenly is replaced by the development version.

  4. #4
    Join Date
    Dec 2006
    Beans
    8
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: [Python] why is site-packages in /usr/local/lib.. ignored in Jaunty?

    thanks for pointing me to the link, was a pretty big shock to me when things I thought would work stopped working... took sometime to find out site-package isn't being used anymore... I'm missing it

    So how does one test libraries one? Sym-linking into dist-packages whenever temping to sym-link into site-packages before instead? Is that the standard way of doing things now?

  5. #5
    Join Date
    Jul 2008
    Beans
    64

    Re: [Python] why is site-packages in /usr/local/lib.. ignored in Jaunty?

    I can think of two approaches to use. Since I need to test with multiple versions of Python, I install and create symlinks for py23, py24, py25, py26, py30, and py31. Then I install my application for each version of Python. I just don't use the Ubuntu installed version of Python at all.

    IIRC, you can modify the path by editing either either site.py or site_customize.py. The path is modified in one of those files. I had to remove site-packages from that file. You'll probably want to add it. Or you can try setting the environment variable PYTHON_PATH.

Bookmarks

Posting Permissions

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