baudren / montepython_public

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

Import error of cosmohammer modules #47

Open 0satoken opened 9 years ago

0satoken commented 9 years ago

Hello,

I am trying to use cosmohammer in montepython. I have installed emcee(2.1.0) and cosmohammer(0.5.0) from pip but montepython can not import modules.

I have tested the installation by typing following command in python and this gives no error.

>>> from cosmoHammer import LikelihoodComputationChain

Here is the error message from montepython.

$ python montepython/MontePython.py run -p input/lcdm.ini -o chains/test -m CH

run
Running Monte Python v2.1.4

with CLASS v2.4.3

Testing likelihoods for:
 -> fake_planck_bluebook

Traceback (most recent call last):
  File "montepython/MontePython.py", line 40, in <module>
    sys.exit(run())
  File "/home/osatokn/work/montepython/montepython/run.py", line 44, in run
    sampler.run(cosmo, data, command_line)
  File "/home/osatokn/work/montepython/montepython/sampler.py", line 49, in run
    import cosmo_hammer as hammer
  File "/home/osatokn/work/montepython/montepython/cosmo_hammer.py", line 25, in <module>
    from cosmoHammer.likelihood.chain.LikelihoodComputationChain import (
ImportError: No module named likelihood.chain.LikelihoodComputationChain

Many thanks, Ken