A Saturday 19 March 2011 10:30:30 Francesc Alted escrigué:
> A Friday 18 March 2011 19:33:57 nicky van foreest escrigué:
> > Hi Francesc,
> > 
> > Thanks for your answer.
> > 
> > On 17 March 2011 08:35, Francesc Alted <fal...@pytables.org> wrote:
> > > A Wednesday 16 March 2011 22:34:11 nicky van foreest escrigué:
> > >> Hi,
> > >> 
> > >> While trying to install pytables on ubuntu I run into a strange
> > >> (for me) problem. I followed the instructions in the README, and
> > >> indeed with the PYTHONPATH with . I can run the test succesfully
> > >> in ipython in ~/build/tables. However, if I run ipthon in
> > >> another directory, e.g., ~/build/ and try to import pytables in
> > >> another directory I get the error:
> > >> 
> > >> ImportError: libhdf5-1.6.6.so.0: cannot open shared object file:
> > >> No such file or directory
> > >> 
> > >> Of course I ran sudo python setup.py install but to no avail.
> > > 
> > > Is it possible that you already have stale files of previous
> > > PyTables installations?  If so, I'd suggest to clean up them.
> > > 
> > >  Also, double check that the HDF5 lib/ dir is in your
> > > 
> > > LD_LIBRARY_PATH.
> > 
> > I did this, but this did not work. Here is the output:
> > 
> > $ pip install -U tables
> > Downloading/unpacking tables
> > 
> >   Running setup.py egg_info for package tables
> >   
> >     * Found numpy 1.5.1 package installed.
> >     * Found HDF5 headers at ``/usr/include``, library at
> > 
> > ``/usr/lib64``.
> > 
> > So I set
> > 
> > $ export LD_LIBRARY_PATH=/usr/lib64/
> > 
> > running ipython then gives the following error:
> > 
> > nicky@chuck:~/build$ ipython
> > Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
> > Type "copyright", "credits" or "license" for more information.
> > 
> > IPython 0.10 -- An enhanced Interactive Python.
> > ?         -> Introduction and overview of IPython's features.
> > %quickref -> Quick reference.
> > help      -> Python's own help system.
> > object?   -> Details about 'object'. ?object also works, ?? prints
> > more.
> > 
> > In [1]: import tables
> > -------------------------------------------------------------------
> > -- ------ ImportError                               Traceback (most
> > recent call last)
> > 
> > /home/nicky/build/<ipython console> in <module>()
> > 
> > /home/nicky/lib/python/tables/__init__.py in <module>()
> > 
> >      54
> >      55 # Necessary imports to get versions stored on the Pyrex
> > 
> > extension
> > 
> > ---> 56 from tables.utilsExtension import getPyTablesVersion,
> > getHDF5Version 57
> > 
> >      58 __version__ = getPyTablesVersion()
> > 
> > ImportError: libhdf5-1.6.6.so.0: cannot open shared object file: No
> > such file or directory
> > 
> > 
> > This is kind of strange, at least for me.
> > 
> > >> There is some other strange problem too.  To install tables I
> > >> used pip install -U tables. This comes a long way in the right
> > >> direction, but fails to completely compile tables. For this it
> > >> is necessary to enter the build/tables directory and run python
> > >> setup.py install. Why is that?
> > > 
> > > Can you attach the logs of the errors?
> > 
> > Sure, Thanks again for your help.
> 
> I can see in your logs a couple of suspicious things:
> 
> """
> Removing /usr/local/lib/python2.6/dist-packages/tables-2.2.1.egg-info
> 
> error: /usr/local/lib/python2.6/dist-packages/tables-2.2.1.egg-info:
> Permission denied
> """
> 
> Are you sure that you have writing permissions in /usr/local?  I.e.
> make sure that you are super-user before installing.
> 
> Another thing:
> 
> """
>     building 'tables.linkExtension' extension
>     C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv
> - O2 -Wall -Wstrict-prototypes -fPIC
> 
>     compile options: '-DNDEBUG=1 -DHAVE_BZ2_LIB=1 -Iblosc -
> I/usr/local/lib/python2.6/dist-packages/numpy/core/include -
> I/usr/include/python2.6 -c'
>     extra options: '-Isrc -DH5_USE_16_API'
>     gcc: tables/linkExtension.c
>     gcc: tables/linkExtension.c: No such file or directory
> 
> """
> 
> I don't understand why you don't have the tables/linkExtension.c
> file. I have double checked that it exists in
> http://www.pytables.org/download/pytables-2.2.1/tables-2.2.1.tar.gz,
> so why it does not in your case?  At any rate, installing Cython can
> help in regenerating the files locally.

I was wrong, and 'tables/linkExtension.c' as such does not exists, but 
rather 'tables/linkExtension16.c' and 'tables/linkExtension18.c', which 
are versions for HDF5 1.6 and HDF5 1.8 series.

After going nuts for a long while, I realized that the problem only 
shows up when you try to install PyTables by using ``easy_install`` and 
``pip`` utilities, and automatic Cython compilations fails in this case, 
as shown in:

http://www.velocityreviews.com/forums/t693861-cython-setuptools-not-
working-with-pyx-only-with-c-files.html

In order to make PyTables's setup.py to deal with this, I've emulated 
the Cython compilation layer the 'hard' way.  The new code is in SVN 
trunk, and people can finally install PyTables the easy_install/pip way 
again by using:

$ easy_install install -U http://www.pytables.org/svn/pytables/trunk

or

$ pip install -U http://www.pytables.org/svn/pytables/trunk

Of course, you will get the trunk installed instead of the stable 
version, but generally speaking trunk is safe enough, and that might be 
enough for people interested in trying out PyTables quickly.

-- 
Francesc Alted

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to