baudren / montepython_public

Public repository for the Monte Python Code
MIT License
65 stars 115 forks source link

import error with class #83

Open akhileshnautiyal opened 7 years ago

akhileshnautiyal commented 7 years ago

I am trying to install MontePython. after installing class with make -j I tried to see whether the python wrapper of class is working or not. I typed the following command from classy import Class and I got the following error

Traceback (most recent call last): File "", line 1, in ImportError: /home/user/.local/lib/python2.7/site-packages/classy.so: undefined symbol: _ZGVbN2v_sin

I am using the latest 2.6 version of class.

brinckmann commented 7 years ago

Hi, I'm not quite sure what is causing the issue, but to narrow it down can you please make sure that everything is installed for, compiled with and being run with Python 2.7, and not Python 3 (i.e. scipy, numpy, cython and the CLASS wrapper)? The CLASS wrapper itself should be compatible with Python 3, but since you want to run it with MontePython, you will need it compiled with Python 2 for that. Regards, Thejs

carlosggarcia commented 7 years ago

It is a known issue. See last comment in https://github.com/lesgourg/class_public/issues/99

In class folder, in python/setup.py, I had to change the line libraries=["class"], to libraries=["class", "mvec", "m"], to explicitly link those libraries.