gandalfcode / gandalf

GANDALF (Graphical Astrophysics code for N-body Dynamics And Lagrangian Fluids)
GNU General Public License v2.0
44 stars 12 forks source link

How to run in Anaconda with python 2.7? #182

Closed ghost closed 5 years ago

ghost commented 5 years ago

I think this code can be used in python 2.7,or not ? and I already install swig and gandalf in Anaconda2, but when I run example01.py, I got error message from spyder:

File "C:\Users\admin\Anaconda2\lib\site-packages\gandalf\analysis\SimBuffer.py", line 25, in from swig_generated.SphSim import SimulationBase, SphSnapshotBase, Parameters

ImportError: No module named SphSim

I am curious about that is there any module in folder "swig_generated"? Is there any "other" tutorial or user guide can be read? I need to learn how to use this code from scratch. I think the powerpoints in GANDALF school are not helpful for those who did not take part in that workshop definitely. Thank you.

rbooth200 commented 5 years ago

Have you built the code first using make? The build process should create the files needed in the swig_generated folder.

ghost commented 5 years ago

thank for reply. umm... I do not really understand what you say, sorry. could you record a short video and upload to youtube to show how to install gandalf from scratch till run one example simulation by python on linux system? I think this is the easist way for me and other navionics to understand how to run this code. if you are willing to do so, thank you a lot.

ghost commented 5 years ago

after conduct "make" in the folder of "gandalf-master", and "python setup.py install" I think I have already set up the environment.