Test.py:
try:
   
from visa import *
except Exception as ex:
   
print ex
    raw_input
()
Setup.py:
from distutils.core import setup
import py2exe

setup
(console=['test.py'])
Works great on my pc but when I compile with py2exe and move to another (Win7) pc and run test.exe I get:
Traceback (most recent call last):
  File "test.py", line 2, in <module>
  File "visa.pyo", line 1, in <module>
  File "pyvisa\visa.pyo", line 231, in <module>
  File "pyvisa\vpp43.pyo", line 105, in __new__
  File "pyvisa\visa.pyo", line 227, in init
  File "pyvisa\vpp43.pyo", line 758, in open_default_resource_manager
  File "pyvisa\vpp43.pyo", line 175, in __call__
  File "pyvisa\vpp43.pyo", line 141, in load_library
  File "ctypes\__init__.pyo", line 423, in __getattr__
  File "ctypes\__init__.pyo", line 353, in __init__
WindowsError: [Error 126] The specified module could not be found
Any ideas?