Problem loading pymc (gp and gp_submodel)

85 views
Skip to first unread message

Xavier

unread,
Mar 12, 2010, 2:48:48 AM3/12/10
to py...@googlegroups.com
Dear all,

After several attempts to install pymc from easy_install (2.0), I have
decided to go with the source install of 2.1.

Apparently everything compiles ok, with no errors. But when I import pymc
from o fresh pymc start, I get the following error:

-----8<---------------
In [1]: import pymc
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)

/home/... [ deleted ] /<ipython console> in <module>()

/usr/lib/python2.6/site-packages/pymc/__init__.pyc in <module>()
43 from CircularStochastic import *
44 import distributions
---> 45 import gp
46
47 # Optional modules


/usr/lib/python2.6/site-packages/pymc/gp/__init__.py in <module>()
26 from Realization import *
27 from cov_funs import *
---> 28 from gp_submodel import *
29 from step_methods import *
30

ImportError: No module named gp_submodel

-----8<---------------

Has anyone an idea of how the problem can be solved?

I use gentoo with numpy 1.4.


Thank you,

BTW, for any other Gentoo users: I will try to write an ebuild to have pymc
in the repositories, so any help will be appreciated.

--
- Xavier -

Flavio Coelho

unread,
Mar 12, 2010, 5:28:46 AM3/12/10
to py...@googlegroups.com
As an ex-Gentoo user, I remember there used to be a gui IDE to help with the creation of ebuild packages. I even created some packages with it.
But I can't remember what it was called... thankfully Google is our friend! here is the link:
http://abeni.sourceforge.net/

good luck,

Flávio


--
You received this message because you are subscribed to the Google Groups "PyMC" group.
To post to this group, send email to py...@googlegroups.com.
To unsubscribe from this group, send email to pymc+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pymc?hl=en.




--
Flávio Codeço Coelho

Anand Patil

unread,
Mar 12, 2010, 5:35:09 AM3/12/10
to py...@googlegroups.com
Hi Xavier,

Where did you get the source, and is 

pymc/pymc/gp/gp_submodel.py

present in it?

Cheers,
Anand

On Fri, Mar 12, 2010 at 7:48 AM, Xavier <xfi...@gmail.com> wrote:

Xavier

unread,
Mar 12, 2010, 6:02:10 AM3/12/10
to py...@googlegroups.com
Anand Patil vas escriure el dia dv, 12 mar 2010:

> Hi Xavier,
>
> Where did you get the source, and is
>
> pymc/pymc/gp/gp_submodel.py
>
> present in it?

I have used pymc-2.1alpha.tar.gz

And no, gp_submodel.py is not present.

The directory contains:
-----8<---------------
BasisCovariance.py gpplots.py linalg_utils.f
Covariance.py GPutils.py Mean.py
cov_funs incomplete_chol.f NearlyFullRankCovariance.py
FullRankCovariance.py __init__.py Realization.py
-----8<---------------


Thank you,

> > pymc+uns...@googlegroups.com <pymc%2Bunsu...@googlegroups.com>.


> > For more options, visit this group at
> > http://groups.google.com/group/pymc?hl=en.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups "PyMC" group.
> To post to this group, send email to py...@googlegroups.com.
> To unsubscribe from this group, send email to pymc+uns...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pymc?hl=en.
>

--
- Xavier -

Anand Patil

unread,
Mar 12, 2010, 6:09:44 AM3/12/10
to py...@googlegroups.com
On Fri, Mar 12, 2010 at 11:02 AM, Xavier <xfi...@gmail.com> wrote:
Anand Patil vas escriure el dia dv, 12 mar 2010:

> Hi Xavier,
>
> Where did you get the source, and is
>
> pymc/pymc/gp/gp_submodel.py
>
> present in it?

I have used pymc-2.1alpha.tar.gz

And no, gp_submodel.py is not present.

The directory contains:
-----8<---------------
BasisCovariance.py     gpplots.py         linalg_utils.f
Covariance.py          GPutils.py         Mean.py
cov_funs               incomplete_chol.f  NearlyFullRankCovariance.py
FullRankCovariance.py  __init__.py        Realization.py
-----8<---------------


OK... sorry about that, the file was left out of the tarball. We'll be putting a new one up as soon as the paper goes out, which could be any minute now.

For the time being, could you try the 'download source' button at http://github.com/pymc-devs/pymc ?

Thanks,
Anand

Xavier

unread,
Mar 12, 2010, 10:20:09 AM3/12/10
to py...@googlegroups.com
Anand Patil vas escriure el dia dv, 12 mar 2010:

> OK... sorry about that, the file was left out of the tarball. We'll be


> putting a new one up as soon as the paper goes out, which could be any
> minute now.
>
> For the time being, could you try the 'download source' button at
> http://github.com/pymc-devs/pymc ?

Ok, one step further. Now it seems that the "gp" problem has been fixed.

However, I still receive an error message:
-----8<---------------
ValueError Traceback (most recent call last)

/home/ [deleted working directory] /<ipython console> in <module>()

/usr/lib/python2.6/site-packages/pymc/__init__.py in <module>()
52
53 try:
---> 54 import ScipyDistributions
55 except ImportError:
56 pass

/usr/lib/python2.6/site-packages/pymc/ScipyDistributions.py in <module>()
2 import inspect
3 import numpy as np
4 from pymc import Stochastic
5 from copy import copy
6 from distributions import *

/usr/lib/python2.6/site-packages/scipy/stats/__init__.py in <module>()
5 from info import __doc__
6
----> 7 from stats import *
8 from distributions import *
9 from rv import *

/usr/lib/python2.6/site-packages/scipy/stats/stats.py in <module>()
201
202 #import scipy.stats #is this a circular import ?

--> 203 from morestats import find_repeats #is only reference to
scipy.stats
204 import distributions
205

/usr/lib/python2.6/site-packages/scipy/stats/morestats.py in <module>()
5 import statlib
6 import stats
----> 7 import distributions
8 from numpy import isscalar, r_, log, sum, around, unique, asarray
9 from numpy import zeros, arange, sort, amin, amax, any, where, \

/usr/lib/python2.6/site-packages/scipy/stats/distributions.py in <module>()
25 from scipy.special import gammaln as gamln
26 from copy import copy
---> 27 import vonmises_cython
28 import textwrap
29

/home/ [deleted working directory] /numpy.pxd
in scipy.stats.vonmises_cython (scipy/stats/vonmises_cython.c:2939)()

ValueError: numpy.dtype does not appear to be the correct type object


-----8<---------------

Now it seems more scipy-related. Am I right? I use version 0.7.1 (and numpy
1.4.0)

Thank you for your attention.

--
- Xavier -

Anand Patil

unread,
Mar 12, 2010, 10:30:03 AM3/12/10
to py...@googlegroups.com
Yep, that's a new one by me. Try just

from scipy.stats import *

If you get the same error, it's best mentioned on the scipy-users list.

Anand 

Xavier

unread,
Mar 12, 2010, 10:43:57 AM3/12/10
to py...@googlegroups.com
Anand Patil vas escriure el dia dv, 12 mar 2010:

> Yep, that's a new one by me. Try just


>
> from scipy.stats import *
>
> If you get the same error, it's best mentioned on the scipy-users list.

Yes, so it's scipy-related. But I can work with pymc. Will try to solve it
later, and concentrate on model specification.

Thanks for fixing it.

--
- Xavier -

Reply all
Reply to author
Forward
0 new messages