Trying an example

Asked by mrhappy on 2020-01-16

Hi,

I am new to YADE. I want to try the example 01-bouncing-sphere.py . Inn my directory I made 3 folders build install and trunk as suggested in the complie section of https://yade-dem.org/doc/installation.html. In my command line I reach my build directory and then I type
In [5]: cmake -DCMAKE_INSTALL_PREFIX=/home/nabid/Documents/Yade/install /home/nabid/Documents/Yade/trunk/02-gravity-deposition.py
and I get the error:
SyntaxError: invalid syntax

Can you help me?
Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
mrhappy
Solved:
2020-01-18
Last query:
2020-01-18
Last reply:
2020-01-17
Jan Stránský (honzik) said : #1

Hello,

> I am new to YADE

welcome :-)

> I made 3 folders build install and trunk as suggested in the complie section of https://yade-dem.org/doc/installation.html.

these are suggestions for self-compiling yade from source code, (most likely) not what you want now if you only want to test an example script.

> In [5]:

What did you do before? Open terminal? Write "yade" and pressed enter? ... ?

Standardly a script is run by the (terminal) command
yade 02-gravity-deposition.py
but we need more information (like if you installed yade with "sudo apt install" etc, what operating system you use etc. [1]).

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

Jérôme Duriez (jduriez) said : #2

It seems to me you badly mixed YADE installation, e.g. compilation with cmake, that has to be launched in a terminal where I doubt "In [5]:" prompts would appear; and usage, e.g. launching predefined examples after a successful installation
(obviously everyone has to be a beginner one day..).

I would advice to start with the package version of yade for instance https://yade-dem.org/doc/installation.html#packages

mrhappy (mrhappy) said : #3

Ohh guys, I figured it out. The example ran when i typed in yade example.py

Thanks for your help!