Page 1 of 1

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

Posted: December 05 2015
by Alessandro Di Marco
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!!!

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

Posted: December 05 2015
by Antony Lewis
Did you set up the PYTHONPATH as in the python readme instructions?

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

Posted: December 06 2015
by Alessandro Di Marco
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,

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

Posted: December 09 2015
by Alessandro Di Marco
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

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

Posted: December 09 2015
by Alessandro Di Marco
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!