Python and Trelis/Cubit

General topics about Trelis/Cubit, such as localization, GUI, etc.

Python and Trelis/Cubit

Postby Trelis User » Tue Mar 05, 2013 9:05 am

I’m trying to run a python script to make a cubit grid. Some online
examples say I need to “import cubit”, but when I try this I get an
error message saying “no module named cubit”. I poked around a little
bit, but didn't find a cubit module for python on my machine.
Trelis User
Posts: 6
Joined: Wed Jan 09, 2013 12:58 pm

Re: Python and Trelis/Cubit

Postby csimsoft Moderator » Tue Mar 05, 2013 9:09 am

In order for python to find Trelis or Cubit, you'll need to add the path to the file to your PYTHONPATH. For example, if the file is
in /projects/cubit/bin, then you'd do:

export PYTHONPATH=/projects/cubit/bin:$PYTHONPATH

after that you should be able to start python and successfully import cubit.
csimsoft Moderator
Posts: 296
Joined: Tue Feb 14, 2012 5:59 pm
Location: American Fork, UT

Return to General Topics

Who is online

Users browsing this forum: No registered users and 2 guests


Search / Mark

User Control Panel


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 83 on Tue Nov 13, 2018 11:44 am

Users browsing this forum: No registered users and 2 guests