pyvisa: visa.ResourceManager() got function 'viOpen' not found in Windows

Now we use pyvisa to load the visa library in Windows.

But when we call visa.ResourceManager() or visa.ResourceManager(r'C:\Windows\System32\visa32.dll'), it throws exception of “AttributeError: function ‘viOpen’ not found”.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 25 (13 by maintainers)

Most upvoted comments

I get this too, on 32 bits Windows 8.1 installation, with 32 bits python 3.8.6, PyVISA==1.11.3 and Keysight IO Libraries suite. Doing os.add_dll_directory(r"C:\Program Files\Keysight\IO Libraries Suite\bin") fixes the issue for me.

Maybe it might still work for some OS/python version combination or when we are upgrading python instead of a fresh install. https://docs.python.org/3/library/os.html#os.add_dll_directory https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew

I guess there is no other workaround for this outside of using os.add_dll_directory(r"C:\Program Files\Keysight\IO Libraries Suite\bin").

That looks like an issue related to the new dll mechanism access on Python 3.8. However I have a windows system running 3.8 and Keysight with no issue. It may still be an installation issue though. If you do not want to re-install you can try to use os.add_dll_directory to add the Keyisght directory found under Program files.