Starting simulation #543
-
|
After the code is written, how do I properly run its simulation and view the results and visualization? Is it possible to run a simulation in visual studio? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
|
Hello, You can run the code directly from Visual Studio Code. Did you create a conda environment while installing? If yes, make sure that you change your kernel in VS Code to that environment before running your simulation files. |
Beta Was this translation helpful? Give feedback.
-
|
The simulation can only be started using the terminal: python file.py ? Or you can use visual studio, but then it does not find the opengate module. Apparently, in the VS code it is necessary to activate the source openagate_env/bin/activate somehow? |
Beta Was this translation helpful? Give feedback.
-
|
Hi, |
Beta Was this translation helpful? Give feedback.


Hello,
I just did a reinstall with a python venv as shown in the documentation and it worked for me without an error.
Steps I followed -
1 - create a virtual environment and activate it -
python -m venv opengate_envsource opengate_env/bin/activate2 - Install opengate
pip install --upgrade pippip install --pre opengate3 - Run tests
opengate_testsWhen you do this step required Geant4 data and test data will be downloaded.4 - Downloaded test006_runs.py
5 - Run it with python3 test006_runs.py
Can you try reinstalling by following these steps...