AnsweredAssumed Answered

How Do I Install PIConnect Python Module?

Question asked by James Devine on Nov 7, 2019
Latest reply on Nov 12, 2019 by Rick_Davin_3.0

How do I install the PIconnect 0.7.1 module? (reference: PIconnect documentation — PIconnect 0.7.1 documentation ) I have tried following the online documentation, but after I run the 'python setup.py install' without errors and run a simple script to connect to the pi server and print out its name I get this error message:

Traceback (most recent call last):
File "c:\Users\vdevine\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\vdevine\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\lib\python\old_ptvsd\ptvsd\__main__.py", line 432, in main
run()
File "c:\Users\vdevine\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\lib\python\old_ptvsd\ptvsd\__main__.py", line 316, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\Users\vdevine\Desktop\START.2019\PI.Software\PI.Connect\PIconnect-0.7.1\tests\connect_to_pi_server.00.py", line 1, in <module>
import PIconnect as PI
ModuleNotFoundError: No module named 'PIconnect'

 

What am I missing here??

BTW the script is:

# Connect to the default pi server and print its name =>
import PIconnect as PI
with PI.PIServer() as server:
      print(server.server_name)

Outcomes