You are not logged in.

#1 2008-11-03 03:50:48

sidc
Member
Registered: 2008-06-19
Posts: 76

Most scientific python packages broken

After the update to 2.6, packages such as numpy, scipy, matplotlib, etc are not working anymore. I get the following error in ipython when trying to import any one of them.

In [1]: import numpy
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

/home/msid/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/numpy/__init__.py in <module>()
    123         return loader(*packages, **options)
    124 
--> 125     import add_newdocs
    126     __all__ = ['add_newdocs']
    127 

/usr/lib/python2.5/site-packages/numpy/add_newdocs.py in <module>()
      7 #       core/fromnumeric.py, core/defmatrix.py up-to-date.

      8 
----> 9 from lib import add_newdoc
     10 
     11 add_newdoc('numpy.core', 'dtype',

/usr/lib/python2.5/site-packages/numpy/lib/__init__.py in <module>()
      2 from numpy.version import version as __version__
      3 
----> 4 from type_check import *
      5 from index_tricks import *
      6 from function_base import *

/usr/lib/python2.5/site-packages/numpy/lib/type_check.py in <module>()
      6            'common_type']
      7 
----> 8 import numpy.core.numeric as _nx
      9 from numpy.core.numeric import asarray, asanyarray, array, isnan, \
     10                 obj2sctype, zeros

/usr/lib/python2.5/site-packages/numpy/core/__init__.py in <module>()
      3 from numpy.version import version as __version__
      4 
----> 5 import multiarray
      6 import umath
      7 import _internal # for freeze programs

ImportError: libpython2.5.so.1.0: cannot open shared object file: No such file or directory

I even tried reinstalling them, but the packages always install in the python2.5 directory sad . Is a recompilation needed in the repositories?

Offline

#2 2008-11-03 03:53:39

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,404
Website

Re: Most scientific python packages broken

There are a few [community] packages that still need rebuilt.  We were working on it when the server went down.  They should get done soon but file big reports for the packages you notice.

BTW, a simple rebuild using ABS should get you by for the time being...

Offline

#3 2008-11-03 03:58:20

sidc
Member
Registered: 2008-06-19
Posts: 76

Re: Most scientific python packages broken

Yes, I know that rebuilding using ABS should get me by, but I am behind my college proxy, and ABS does not go through proxy( which I discovered after several attempts sad ).

Offline

#4 2008-11-03 04:00:31

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,404
Website

Re: Most scientific python packages broken

New feature in abs-2.3....  Try "abs -t"

Offline

#5 2008-11-03 04:06:06

sidc
Member
Registered: 2008-06-19
Posts: 76

Re: Most scientific python packages broken

Wow thx !!!! *bows down* .Its these little things that just make my day a lot brighter smile

Offline

#6 2008-11-03 17:02:54

sidc
Member
Registered: 2008-06-19
Posts: 76

Re: Most scientific python packages broken

Oh damn, apparently  numpy is not compatible with python 2.6. Is there anyway to make it use python 2.5?

Offline

#7 2008-11-04 02:28:52

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Most scientific python packages broken

What do you mean, make it use python2.5? It only gets loaded by an already-running Python interpreter, there's no way that numpy can change the version of the interpreter that's loading it.

What you can control is: (1) keep a copy of python2.5 on your machine, and (2) install numpy in the /usr/lib/python2.5/site-packages folder. (2) is easy: just tweak the numpy PKGBUILD to make sure that the python interpreter that's doing the install is itself 2.5. (1) is of course doable but I think will be more work---that is, if you also want to upgrade to python2.6. You're going to have to rewrite the python PKGBUILDs to enable you to have different versions side-by-side. Or, you could just let pacman upgrade to python2.6, and install python2.5 from source in /usr/local/bin (without using pacman).

When someone has gotten (debugged) PKGBUILD tweaks that install different versions of Python beside each other, please share the love.

Offline

#8 2008-11-04 02:41:31

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,404
Website

Re: Most scientific python packages broken

Profjim wrote:

When someone has gotten (debugged) PKGBUILD tweaks that install different versions of Python beside each other, please share the love.

Well, there is python and python24 in the official repos and python3 in the AUR that can guide you.

Can you please file a bug report about numpy to remind the maintainer to fix it for python2.6.

Offline

#9 2008-11-04 07:59:52

sidc
Member
Registered: 2008-06-19
Posts: 76

Re: Most scientific python packages broken

Profjim wrote:

What do you mean, make it use python2.5? It only gets loaded by an already-running Python interpreter, there's no way that numpy can change the version of the interpreter that's loading it.

What you can control is: (1) keep a copy of python2.5 on your machine, and (2) install numpy in the /usr/lib/python2.5/site-packages folder. (2) is easy: just tweak the numpy PKGBUILD to make sure that the python interpreter that's doing the install is itself 2.5. (1) is of course doable but I think will be more work---that is, if you also want to upgrade to python2.6. You're going to have to rewrite the python PKGBUILDs to enable you to have different versions side-by-side. Or, you could just let pacman upgrade to python2.6, and install python2.5 from source in /usr/local/bin (without using pacman).

When someone has gotten (debugged) PKGBUILD tweaks that install different versions of Python beside each other, please share the love.

Numpy is already installed in python2.5/site-packages, but when I try to import it in ipython, I get the error

ImportError: libpython2.5.so.1.0: cannot open shared object file: No such file or directory

And since there is no python2.5 in the repos, only 2.4, I guess I will have to install that.

Last edited by sidc (2008-11-04 08:01:48)

Offline

#10 2008-11-04 10:55:55

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: Most scientific python packages broken

Offline

#11 2008-11-04 13:14:35

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Most scientific python packages broken

ImportError: libpython2.5.so.1.0: cannot open shared object file: No such file or directory

That's because you no longer have python2.5 (fully) installed. Having numpy where python2.5 will look for it is only part of the story.

What you say about ipython puzzles me. For, since you don't have python2.5 (fully) installed, I'm expecting that your ipython instance is using the python2.6 interpreter. On the other hand, when you try to import numpy from within ipython, it knows to get it from the python2.5 site-packages directory. Why would it do that if the running interpreter is python2.6?

Perhaps there's one of those python aliases (what are they called? site.pth or something like that?) in the python2.6 site-packages directory that adds the older site-packages directory to the path that python2.6 uses to search for modules.

In any event, if you want to use ipython and numpy both with python2.5, you'll need to make sure that you have a copy of ipython installed where python2.5 can find it, and a way to start ipython using the python2.5 interpreter. This will most likely involve tweaking the ipython PKGBUILD too, to let you have multiple versions of ipython installed side-by-side, one for each version of python.

Language upgrades are a PITA.

Last edited by Profjim (2008-11-04 13:22:40)

Offline

#12 2008-11-04 14:25:38

sidc
Member
Registered: 2008-06-19
Posts: 76

Re: Most scientific python packages broken

Oh man....I just think I'll end up doing some dirty makeshift thing if I try to repair this. I think I'll wait for the packages to be rebuilt in the repos and then I'll do something about this.

Offline

#13 2008-11-04 18:06:47

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Most scientific python packages broken

How about making a link to libpython2.6.so.1.0  ?
I did that to make medit work and it complained about the exact same lib. Now medit got updated and it works without the link.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#14 2008-11-04 19:05:54

sidc
Member
Registered: 2008-06-19
Posts: 76

Re: Most scientific python packages broken

Lol, thats exactly the temporary fix I was talking about. I did just that, but somehow I feel its no more than a dirty quick fix big_smile

Offline

#15 2008-11-04 23:22:33

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,404
Website

Re: Most scientific python packages broken

Don't symlink libraries.  They have difference so-names for a reason.  This may seem to fix a problem but creates others that are very difficult to figure out..

Offline

#16 2008-11-07 14:12:36

prakti
Member
Registered: 2008-09-12
Posts: 5

Re: Most scientific python packages broken

Why has the upgrade to 2.6 been done at all. Is there some sort of automated build-system that checks compatibility?

Offline

#17 2008-11-07 15:08:51

prakti
Member
Registered: 2008-09-12
Posts: 5

Re: Most scientific python packages broken

The scipy-problem with python-2.6 seems to be corrected in the svn-version. I'm trying to whip up an AUR-package.

Offline

#18 2008-11-07 15:29:54

prakti
Member
Registered: 2008-09-12
Posts: 5

Re: Most scientific python packages broken

Offline

#19 2008-11-07 16:28:14

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Most scientific python packages broken

prakti wrote:

Why has the upgrade to 2.6 been done at all. Is there some sort of automated build-system that checks compatibility?

Not really. Devs check which packages depend on python (and which packages depend on packages that depend on python...) and rebuild them. It's a bit tricky with interpreted languages, because you really have to run and test the application; even if there was some sort of successful binary compilation involved, you can't really be sure that it'll run the same as before with the old libraries.
There are some tools like 'lddd' or the regular "integrity check" reports you find on the arch-dev-public mailing list, but that's not really suited for stuff like Python/Perl/Ruby.

As to why the upgrade was made altogether, that's easy: It's the latest stable upstream version and Arch is Rolling Release ;]
Upgrading important 'glue' packages like this one, or GCC, Xorg, Berkeley DB etc., will always cause some amount of trouble for a while, but by reporting such bugs you'll not only help other Archers with your experience, but also improve the integration between upstream projects.


1000

Offline

#20 2008-12-11 10:56:47

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Re: Most scientific python packages broken

I have python 2.6 installed...will scipy and numpy work?


Gnu/Linux User on Arch(x86_64)

Offline

#21 2008-12-11 11:30:25

dcrabs
Member
From: Sweden
Registered: 2008-10-03
Posts: 149

Re: Most scientific python packages broken

The_ouroboros wrote:

I have python 2.6 installed...will scipy and numpy work?

yes, it works fine here. the only thing I see is this:

DeprecationWarning: os.popen4 is deprecated.

Offline

#22 2008-12-11 13:36:20

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Re: Most scientific python packages broken

so I just install python-scipy, python-numpy, python-matplotlib and they'll work fine?

Last edited by The_ouroboros (2008-12-11 13:38:21)


Gnu/Linux User on Arch(x86_64)

Offline

#23 2008-12-11 19:00:52

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Re: Most scientific python packages broken

up


Gnu/Linux User on Arch(x86_64)

Offline

#24 2008-12-11 21:26:29

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Most scientific python packages broken

Just install them and try it?!


1000

Offline

#25 2008-12-12 01:42:49

xaiviax
Member
From: Michigan
Registered: 2008-11-04
Posts: 282

Re: Most scientific python packages broken

I use numpy and matplotlib and they work fine.

Offline

Board footer

Powered by FluxBB