Hello I have a hard time trying to make the python bridge to work on Mac (OS X 14.2 localized, IDL 8.7.1, python 2.7 and 3.6) I'm using either the Apple install of python 2.7 or a homebrew install of 3.6. The IDL to python seems OK with python in the PATH (I can call python from IDL command line, although not in the workbench), but not the other way around. - Defining a PYTHONHOME logical only results in complete blocking of python (exits with message ImportError: No module named site) - Launching setup.py without PYTHONHOME results in *** PYTHONHOME environment variable must be set to your Python installation. Setup failed. Exiting. - I understand this is a path issue. I've tried a solution found on a forum, I think from IDL support: cd /Applications/harris/idl87/bin/bin.darwin.x86_64/ sudo install_name_tool -change libidl.8.7.dylib @loader_path/libidl.8.7.dylib pythonidl36.so sudo install_name_tool -change libidl_ips.8.7.dylib @loader_path/libidl_ips.8.7.dylib pythonidl36.so sudo install_name_tool -change libpython3.6m.dylib /usr/bin/libpython3.6m.dylib pythonidl36.so At this point, DYLD_LIBRARY_PATH is still needed in the .login to specify IDL’s bin directory. To eliminate that, the following updates can be made to tell various libraries where to find their dependencies: sudo install_name_tool -change libMesaGL6_2.dylib @loader_path/libMesaGL6_2.dylib libidl.8.7.dylib sudo install_name_tool -change libMesaGLU6_2.dylib @loader_path/libMesaGLU6_2.dylib libidl.8.7.dylib sudo install_name_tool -change libOSMesa6_2.dylib @loader_path/libOSMesa6_2.dylib libidl.8.7.dylib sudo install_name_tool -change libXm.3.0.2.dylib @loader_path/libXm.3.0.2.dylib libidl.8.7.dylib sudo install_name_tool -change libMesaGL6_2.dylib @loader_path/libMesaGL6_2.dylib libMesaGLU6_2.dylib sudo install_name_tool -change libMesaGL6_2.dylib @loader_path/libMesaGL6_2.dylib libOSMesa6_2.dylib sudo install_name_tool -change libidl.8.7.dylib @loader_path/libidl.8.7.dylib libidl_ips.8.7.dylib - But this doesn't fix it: When typing: from idlpy import * from any dir I get ModuleNotFoundError: No module named 'idlpy' - Launching from /Applications/harris/idl87/lib/bridges with an alias of pythonidl.36 put there, I get: ImportError: dlopen(/Applications/harris/idl87/lib/bridges/pythonidl36.so, 2): no suitable image found. Did find: /Applications/harris/idl87/lib/bridges/pythonidl36.so: file too short /Applications/harris/idl87/lib/bridges/pythonidl36.so: stat() failed with errno=13 - and by the way, the date oof pythonidl.36 is changed in the process - as if the file were modified. This is probably a small thing, but a very annoying one. Can you provide any clue, or ideally a fix to setup.py? I'd love to use IDL in Jupyter notebooks… (you may also want to fix the Mac path to setup.py in https://www.harrisgeospatial.com/docs/Python.html) Regards
|