SmokinCaterpillar / pypet

The new python parameter exploration toolbox. pypet manages exploration of the parameter space and data storage into HDF5 files for you.
BSD 3-Clause "New" or "Revised" License
89 stars 22 forks source link

Pypet fails to load its modules for local installation #36

Closed mmajewsk closed 8 years ago

mmajewsk commented 8 years ago

I have installed pypet locally (via pip install --user pypet), and cant load it correctly. When running example https://github.com/SmokinCaterpillar/pypet#quick-working-example it results in following error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-6-553c51cf051d> in <module>()
----> 1 from pypet import Environment, cartesian_product
      2 import time
      3 
      4 def multiply(traj):
      5     time.sleep(5)

/net/people/hawker/.local/lib/python2.7/site-packages/pypet/__init__.py in <module>()
     11 
     12 
---> 13 from pypet.environment import Environment, MultiprocContext
     14 from pypet.trajectory import Trajectory, load_trajectory
     15 from pypet.storageservice import HDF5StorageService, LazyStorageService

/net/people/hawker/.local/lib/python2.7/site-packages/pypet/environment.py in <module>()
     66     zmq = None
     67 
---> 68 import pypet.compat as compat
     69 import pypet.pypetconstants as pypetconstants
     70 from pypet.pypetlogging import LoggingManager, HasLogger, simple_logging_config

AttributeError: 'module' object has no attribute 'compat'

Done under python 2.7.5.

SmokinCaterpillar commented 8 years ago

Hi,

I cannot reproduce the error using a fresh Anaconda environment with python 2.7.5-3. Which operating system are you running? And do you have the newest pypet version (i.e 0.3.0)?

mmajewsk commented 8 years ago

@SmokinCaterpillar Sorry, i accidentally took this as a pypet problem

I tried loading pypet directly into ipython notebook, so when i tried it first time it gave different error, but when i retried it gave the one i posted above (it loads faulty library into python).

>>> import pypet
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/net/people/hawker/.local/lib/python2.7/site-packages/pypet/__init__.py", line 13, in <module>
    from pypet.environment import Environment, MultiprocContext
  File "/net/people/hawker/.local/lib/python2.7/site-packages/pypet/environment.py", line 69, in <module>
    import pypet.pypetconstants as pypetconstants
  File "/net/people/hawker/.local/lib/python2.7/site-packages/pypet/pypetconstants.py", line 15, in <module>
    import tables
  File "/net/software/local/python/2.7.9/lib/python2.7/site-packages/tables/__init__.py", line 82, in <module>
    from tables.utilsextension import (
ImportError: libhdf5.so.8: cannot open shared object file: No such file or directory
>>> import pypet
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/net/people/hawker/.local/lib/python2.7/site-packages/pypet/__init__.py", line 13, in <module>
    from pypet.environment import Environment, MultiprocContext
  File "/net/people/hawker/.local/lib/python2.7/site-packages/pypet/environment.py", line 68, in <module>
    import pypet.compat as compat
AttributeError: 'module' object has no attribute 'compat'

So the real error is not with pypet, but with PyTables. Most likely because of some faulty installation of pytables or hdf5. The error occurs on external computational cluster, and i just have noticed the administrator. I am also unable to recreate the error elsewhere.

Sorry for the false alarm. Issue can be closed.

SmokinCaterpillar commented 8 years ago

Hi, no problem.

Btw, I guess you can install packages locally on the cluster. So have you tried installing your own Anaconda Python distribution (https://www.continuum.io/downloads)? This makes managing Python packages and creating new environments a lot easier and maybe help you with your faulty hdf5 installation.