Mac M1 processor compatibility with python pyvisa

One of the reasons for this purchase was using it with python to control test equipment over the USB bus or LAN. It turns out that python's PyVisa doesn't seem to be compatible with with either the M1 processor or Monterey. Every few months I waste a few hours searching for a solution. I'm reaching out with the hope someone has worked through this issue.


One thing I've noticed is that National Instruments hasn't updated their VISA solutions to be compatible with Monterey.

MacBook Pro 16″, macOS 12.4

Posted on Jun 6, 2022 10:47 AM

Reply
2 replies

Jun 6, 2022 12:13 PM in response to heerema

You need to ensure that a 64-bit version of PyVISA (requires Python 3.6+) is accessing a 64-bit National Instruments NI-VISA library, and both are current updates. The NI-VISA library version 21.0 was released in July 2021, so may be incompatible with Monterey. Talk to the vendors. You may be done until National Instruments updates their library for Monterey compatibility.

Jul 11, 2022 4:54 PM in response to heerema

You could look into using the SwiftVISA wrapper and the SwiftVISASwift implementation.

https://github.com/SwiftVISA


The above Project has a lot of repositories. The main ones to look at are SwiftVISA, which is a framework that wraps the NI-VISA framework similar to what pyVISA does. Or you can use the SwiftVISASwift package, which reimplements VISA. I like prefer using the SwiftVISASwift package because it is easier to use on in an XCode project compared to the SwiftVISA framework.


Things to note:

  • you will need to change your build architecture to just x86_64 if you use the SwiftVISA framework since NI-VISA is only compiled for x86.
  • SwiftVISASwift is limited to just TCP/IP devices at this time. macOS Monterey really cracked down on USB kexts and there isn't a good, open-source package for USB communication to implement a USB Message Instrument.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mac M1 processor compatibility with python pyvisa

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.