comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Python bridge with MacPorts python 2.7?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Python bridge with MacPorts python 2.7? [message #91889] Tue, 08 September 2015 17:56 Go to previous message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
Dear Folks,

Before taking the time to figure this out for myself, I was wondering if
anyone had the IDL-Python bridge working with a MacPorts install
of python. Specifically, what are the right environment variables for
such a system?

The MacPorts version of python is the first one to be called with my
PATH. So I tried out the bridge without any new environment variables
and obtained

IDL> Python.Import('numpy.random')
% Loaded DLM: PYTHON27.
ImportError: numpy.core.multiarray failed to import
% PYTHON_IMPORT: Exception: cannot import name multiarray.

Then I tried setting the following in my .profile:
export PYTHONHOME="/opt/local/Library/Frameworks/Python.framework/Version/2.7 "
export PYTHONPATH=" /Applications/exelis/idl/bin/bin.darwin.x86_64:/Applications /
exelis/idl/lib/bridges"

This yielded

IDL> Python.Import('numpy.random')
% Loaded DLM: PYTHON27.
ImportError: No module named site

and dumped my back to the shell, rather than the IDL prompt.
This made me realize that I might save quite a bit of time by seeking
advice from someone who's already made it work.

Funnily enough, Slither just worked for me out of the box.

Many thanks,

David
[Message index]
 
Read Message
Read Message
Previous Topic: How to obtain covariance for unequal samples in IDL?
Next Topic: Invert Matrix, MATLAB vs IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:39:45 PDT 2025

Total time taken to generate the page: 0.00385 seconds