[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: python-2.1 for unstable?



On Mon, May 21, 2001 at 01:12:57PM -0700, Neil Schemenauer wrote:
> Gordon Sadler wrote:
> > I'd just like to comment on this. I installed python2.1 some time ago in
> > /usr/local. However this leads to problems. You have to modify some of
> > the code (eg PYTHONPATH IIRC) due to using prefix=/usr/local.
> 
> Which code is "the code"?  The code distributed with Python works
> fine when installed in /usr/local.
> 
I was doing something awful here. You are correct, now that you've
pointed out (don't move /usr/lib/python1.x to /usr/local/lib/python2.x)

> > If you do not modify the code, all of your installed python
> > modules/packages (in prefix=/usr) will not be found by
> > /usr/local/bin/python.
> 
> Which modules are you talking about?  If you have pure Python
> modules you can make them available to Python 2.1 by copying the
> source files to /usr/local/lib/python2.1/site-packages and
> running compileall.py on them.  Extension modules have to be
> recomplied for 2.1.  Its easy if the extensions use distutils:
> 
Actually I just did:
cd /usr/lib/site-python
cp *py /usr/local/lib/site-python

then ran compileall.py on /usr/local/lib/site-python.

I was completely missing the version independent items before. For some
reason I was trying to move /usr/lib/python1.5/site-packages/* to my
/usr/local python2 -(. Thanks for setting this straight.

>     $ python2.1 setup.py build
>     $ su
>     $ python2.1 setup.py install
> 
> > I don't think I ever got it quite right, perhaps a simple 
> > export PYTHONPATH=/usr/local/lib/python{2,2.1}:/usr/lib/python1.5
> 
> Bad idea.  The stuff in /usr/lib/python1.5 is for Python 1.5.  It
> might by chance work with 2.0 or 2.1 but don't count on it.
> 
You are correct here as well. When I did some of this it was rather late
at night, bad habit of staying up late and trying to twiddle stuff on my
system. Thanks again.

-- 
Gordon Sadler



Reply to: