pymc-devs / pymc2

THIS IS THE **OLD** PYMC PROJECT (VERSION 2). PLEASE USE PYMC INSTEAD:
http://pymc-devs.github.com/pymc/
Other
879 stars 229 forks source link

undefined symbol: dcopy_wrap_ #164

Closed RafaelCRdeLima closed 6 years ago

RafaelCRdeLima commented 7 years ago

Hello, when I run the test suite I get this error: raceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/pymc/init.py", line 48, in from . import gp File "/usr/local/lib/python2.7/dist-packages/pymc/gp/init.py", line 22, in from .Covariance import * File "/usr/local/lib/python2.7/dist-packages/pymc/gp/Covariance.py", line 11, in from .incomplete_chol import ichol, ichol_continue ImportError: /usr/local/lib/python2.7/dist-packages/pymc/gp/incomplete_chol.so: undefined symbol: dcopywrap

Could you please help me?

Thanks.

fonnesbeck commented 7 years ago

This looks like a Fortran error. How did you install PyMC? If you built it from source, which Fortran compiler did you use?

Also, are you sure you want to be using PyMC2? You might want to check out PyMC3 unless you have a reason not to.

RafaelCRdeLima commented 6 years ago

Hello, Yes, I downloaded the sources and tried to build it. I am using "GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0".

RafaelCRdeLima commented 6 years ago

Now I've installed the PyMC3 using the pip install. But the same error persisted.

fonnesbeck commented 6 years ago

Yes, pip will be installing it from source as well. Can you try building with the following?

python setup.py config_fc --fcompiler gfortran build

fonnesbeck commented 6 years ago

Wait, just noticed that you said you installed PyMC3, so disregard my comment above. You can’t possibly get the same error with PyMC3 because it does not use Fortran. Make sure you import pymc3 And not pymc

RafaelCRdeLima commented 6 years ago

I've installed the requirements.txt. But, actually my system said I have already everything satisfied. I am really doing something really wrong here. Did I create a conflict between the PyMC versions?

fonnesbeck commented 6 years ago

It’s still not clear to me whether you are dealing with PyMC3 or PyMC2. They are completely different packages, not just versions.

RafaelCRdeLima commented 6 years ago

My last try was this one: git clone https://github.com/pymc-devs/pymc3 cd pymc3 pip install -r requirements.txt

Then I did the following test in the python shell: import pymc pymc.test()

and same error .....undefined symbol: dcopywrap

RafaelCRdeLima commented 6 years ago

Oh, sorry, now I saw I was in the "getting started" doc for the PyMC2.

fonnesbeck commented 6 years ago

You should not be importing pymc, try importing pymc3.

Installing requirements.txt explicitly is not required; all you need to do is pip install pymc3 (or if you are using Anaconda, conda install pymc3) and it should install everything you need.

fonnesbeck commented 6 years ago

Also, the docs for PyMC3 are here.

RafaelCRdeLima commented 6 years ago

Now it is working! Thanks a lot, and sorry for disturbing you. I have just one more question. The problem I want to solve involves the fitting of experimental data. I have a physical model to this data, whose has at least 8 parameters, and also I have a python class for this model. Do you have a example near to this problem?

fonnesbeck commented 6 years ago

You might post that question to our Discourse discussion board, and someone from the community might be able to help. Also, there are a whole set of Jupyter notebooks with a selection of examples that are included in the package, which may be helpful.

RafaelCRdeLima commented 6 years ago

Ok, thanks again.