Skip to main content

How can I modify the PYTHONPATH in CASA? - Knowledgebase / Offline Data Reduction and/or CASA - ALMA Science

How can I modify the PYTHONPATH in CASA?

Authors list

In your home directory you have a directory called ~/.casa/

This directory contains a file called "init.py" that executes each time you start CASA just before the prompt is displayed. You should use this file to edit variables and import modules you want to have available as soon as CASA starts.

Adding a path to the PYTHONPATH variable can be done by adding the following lines to init.py:

print 'Appending my script directory to the PYTHONPATH.'
sys.path.append("/users/test/casapy")

Helpful Unhelpful

33 of 57 people found this page helpful