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)?
See https://lists.ubuntu.com/archives/ub...ry/027439.html I'd paraphrase here, but I don't really understand the motivation.
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.
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?
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.
Ubuntu Forums Code of Conduct