Jump to content
  • 0

Migrating Python code to Mac


JColvin

Question

A user asked this in a different section of the forum but since I'm not seeing a way to just move specific comments, I'm re-posting the question here.

Hi there

I've been using the Analog Discovery with a python code that I wrote that uses the waveforms SDK and it works just fine on windows. I've tried migrating to mac but I'm now having trouble with running my code. So far I followed the link above and installed Waveforms2015 and the Dilient Driver but when I run my code I get the error below ending with 'OSError: dlopen(libdwf.dylib, 6): image not found'

Can you advise? I think it because the install.sh (from the SDK folder) may not be installing correctly. In the terminal, when I run install.sh, all the lines say no such directory.

Error information:


runfile('/Users/Jason/Dropbox/JasonAnalogDiscovery/NMRspectrometer_redefiningAcquirePulseWaitandTrigPos.py', wdir='/Users/Jason/Dropbox/JasonAnalogDiscovery')
dar
Traceback (most recent call last):

  File "<ipython-input-165-c8d6aa72487a>", line 1, in <module>
    runfile('/Users/Jason/Dropbox/JasonAnalogDiscovery/NMRspectrometer_redefiningAcquirePulseWaitandTrigPos.py', wdir='/Users/Jason/Dropbox/JasonAnalogDiscovery')

  File "//anaconda/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 685, in runfile
    execfile(filename, namespace)

  File "//anaconda/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 78, in execfile
    builtins.execfile(filename, *where)

  File "/Users/Jason/Dropbox/JasonAnalogDiscovery/NMRspectrometer_redefiningAcquirePulseWaitandTrigPos.py", line 17, in <module>
    dwf = cdll.LoadLibrary("libdwf.dylib")

  File "//anaconda/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
    return self._dlltype(name)

  File "//anaconda/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)

OSError: dlopen(libdwf.dylib, 6): image not found

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

In order to run your script/application under OS X (10.9, 10.10) install the WaveForms Runtime by executing the install.sh from the lower part of the digilent.waveforms...dmg image.

For OS X 10.11 El Captain use the newer WaveForms 2015 v3.1.4 is sent you in PM. In this version the run-time is moved to a framework. The library can be loaded like:
dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf")

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...