In [ ]:
%config InlineBackend.figure_format = 'retina'
%matplotlib inline

In [2]:
from classy import Class

# Define your cosmology (what is not specified will be set to CLASS default parameters)
params = {
    'output': 'tCl lCl',
    'l_max_scalars': 2000,
    'lensing': 'yes',
    'A_s': 2.3e-9,
    'n_s': 0.9624, 
    'h': 0.6711,
    'omega_b': 0.022068,
    'omega_cdm': 0.12029}

# Create an instance of the CLASS wrapper
cosmo = Class()

# Set the parameters to the cosmological code
cosmo.set(params)

# Run the whole code. Depending on your output, it will call the
# CLASS modules more or less fast. For instance, without any
# output asked, CLASS will only compute background quantities,
# thus running almost instantaneously.
# This is equivalent to the beginning of the `main` routine of CLASS,
# with all the struct_init() methods called.
cosmo.compute()


---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-0b874e9668a3> in <module>()
----> 1 from classy import Class
      2 import numpy as np
      3 import matplotlib.pyplot as plt
      4 cosmo = Class()
      5 cosmo.set({ 'output':'tCl ,pCl , lCl','lensing':'yes',

ImportError: /home/zequnl/.local/lib/python3.6/site-packages/classy.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZGVbN2v_sin

In [ ]: