This shows you the differences between two versions of the page.
— | casa [2017/02/24 11:47] (current) – jansen | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== CASA ====== | ||
+ | Common Astronomy Software Applications, | ||
+ | See also [[http:// | ||
+ | |||
+ | ===== Versions ===== | ||
+ | Due to requirements of different projects, we usually have multiple versions of casa installed. Command '' | ||
+ | |||
+ | ===== Python environment ===== | ||
+ | Casa is built on python, but it comes with its own version, usually a slightly older one. Therefore, you cannot use all the modules we have installed in the usual locations. However, it's possible to build an environment using the casa-supplied version of python and install custom modules there, as long as they don't conflict with the modules that come with casa. | ||
+ | Currently, such an environment is available for casa 4.7.0, the latest version at the time of writing. | ||
+ | To use it, edit your '' | ||
+ | # Set up an additional package directory as described in | ||
+ | # https:// | ||
+ | import site | ||
+ | extrapath="/ | ||
+ | sys.path.append(extrapath) | ||
+ | site.addsitedir(extrapath, | ||
+ | |||
+ | Of course, if you want to use your own directory containing specially built python modules, you can do that, either by replacing the reference to our environment in '' | ||
+ | |||
+ | If you want to build your own python environment for a specific casa version, this is how to get started (or actually, this is how I got this environment started, so replace the path with your own): | ||
+ | wget https:// | ||
+ | mkdir -p / | ||
+ | setenv PYTHONPATH / | ||
+ | / | ||
+ | What this does: first, we download get-pip.py, a script that basically contains pip, and can be used to install it in a python without any of such tools. Next, we make sure the directory structure is in place for installing pip and other python modules. Pointing both PYTHONPATH here when installing, will makes sure that everything will end up in the intended locations. Then, we run get-pip with the python that comes with the chosen casa version to make sure it will integrate properly. | ||
+ | Once pip is installed, using this version of pip will work to install other packages in this directory, e.g. | ||
+ | / | ||
+ | | ||
+ | See also [[https:// |