I inserted the pyvisa library folder into the C:\Program Files\Inductive Automation\Ignition\user-lib\pylib directory. And getting the following error in logs during compilation:
12:30:21.868 [AWT-EventQueue-0] INFO device_control -- Check device button clicked.
12:30:23.635 [AWT-EventQueue-0] ERROR device_control -- Error checking device: Error loading module device_control: Traceback (most recent call last):
File "<module:device_control>", line 5, in <module>
SyntaxError: ("mismatched input '-' expecting COLON", ('C:\\Users\\E40012709\\.ignition\\cache\\gwlocalhost_8088\\C0\\pylib\\pyvisa\\__init__.py', 32, 39, 'def log_to_screen(level=logging.DEBUG) -> None:\n'))