[AstroPy] Importing packages across distributions?

Eric L. N. Jensen ejensen1 at swarthmore.edu
Fri Aug 23 10:13:42 EDT 2013


Hi all,

This is an old thread, but I'm resurrecting it because now I'm encountering a twist on what I asked about previously.  In May, I asked about how to install astropy into the python distribution inside CASA, and Tom helpfully provided the script referenced below, which worked great.  

Now, I'd like to do the same thing, but in the Linux version of CASA.  Tom's script has paths that are specific to the Mac version.  Has anyone succeeded in doing this (installing astropy into CASA) on linux?

Thanks in advance for your help with this,

Eric
 

On May 6, 2013, at 6:35 PM, Thomas Robitaille wrote:

> On 6 May 2013 23:30, Nathan Goldbaum <goldbaum at ucolick.org> wrote:
>> Hi Eric,
>> 
>> I think you need to recursively add all the subfolders in the anaconda
>> folder to your sys.path.  You can also manage all this from the command line
>> by setting the PYTHONPATH.
> 
> I strongly recommend against this - see my previous email. For a
> start, CASA and Anaconda may be using different Python versions (in
> fact they are) and some of the Anaconda packages may conflict with
> CASA.
> 
> The correct way to do it is to install the packages directly into CASA:
> 
> https://github.com/astrofrog/casa-python
> 
> Eric confirmed off-list that this worked.
> 
> Cheers,
> Tom
> 
>> 
>> I'm not familiar with CASA, but presumably it should be possible to install
>> it in a way that uses anaconda's python instead of relying on its own, that
>> way you won't need to worry about this PYTHONPATH mess.  Instructions on how
>> to build CASA from source are available here:
>> https://safe.nrao.edu/wiki/bin/view/Main/ScottRankinCasaBuildNotes
>> 
>> Cheers,
>> 
>> Nathan
>> 
>> 
>> 




More information about the AstroPy mailing list