"ImportError: No module named" during python plotting in CosmoMc

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Alessandro Di Marco
Posts: 15
Joined: April 01 2015
Affiliation: University of Rome - Tor Vergata

\"ImportError: No module named\" during python plo

Post by Alessandro Di Marco » December 05 2015

Hi Antony!
I have a little trouble:
I process chains in /chains with the way ./getdist distparams.ini and here I set no_plots = F, producing the 1d,2d,3d and triangular plots.
When I use the python command

python filename.py

to generate the corrispondent .pdf file I get the following:

Traceback (most recent call last):
File "test_2D.py", line 2, in <module>
import GetDistPlots, os
ImportError: No module named GetDistPlots

Would you help me?(I have installed the July's CosmoMc version)
Thank you in advance!!!

Antony Lewis
Posts: 1379
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: \\\"ImportError: No module named\\\" during py

Post by Antony Lewis » December 05 2015

Did you set up the PYTHONPATH as in the python readme instructions?

Alessandro Di Marco
Posts: 15
Joined: April 01 2015
Affiliation: University of Rome - Tor Vergata

\"ImportError: No module named\" during python plo

Post by Alessandro Di Marco » December 06 2015

Yes, I did :

export PYTHONPATH=.../cosmomc/python:$PYTHONPATH

(where ... is the path in which I have installed CosmoMc) in my bashrc file.
In particulare I put this command at the end of bashrc.
I don't know if I have neglected something else in this procedure!
In any case I will try to compile again the whole code.
Thank you in advance!

The best,

Alessandro Di Marco
Posts: 15
Joined: April 01 2015
Affiliation: University of Rome - Tor Vergata

\"ImportError: No module named\" during python plo

Post by Alessandro Di Marco » December 09 2015

Hi Antony I'm writing this new message because I have resolved the previous question.
I was having errors because I did not have the numpy,scipy and matplotlib libraries for my python version.
Now I can produce the standard the pdf files from the standard .py files.
Nevetheless I have a little problem:
when I plot the for example the test.pdf or test_3D from the corrispondent .py I have no problem but when I do the same thing for test_2D and test_tri I get only the marginalization.
Any suggestion?
Could be a library-problem again!?
Thank you in advance for the response!

The Best,

Alessandro

Alessandro Di Marco
Posts: 15
Joined: April 01 2015
Affiliation: University of Rome - Tor Vergata

\"ImportError: No module named\" during python plo

Post by Alessandro Di Marco » December 09 2015

Ps: In this sense for test_2D.pdf I get only "empty plot" while for test_tri.pdf I get figures only along the diagonal and the others are again blanks!

Post Reply