Solved

Connect Python API in Windows Virtual Machine

  • 3 February 2022
  • 1 reply
  • 161 views

Hi everyone, 

Since I have Ubuntu as a primary OS, I installed OpticStudio in a Windows Guest Virtual Machine. Is there any possibility to connect ZOS-API to my runnig Python scripts on Ubuntu ? Thank you very much 

 

Greetings, 

Alaeddine Yacoub

icon

Best answer by MichaelH 11 April 2022, 20:41

View original

1 reply

Userlevel 6
Badge +2

Hi Alaeddine,

If you want to control OpticStudio via python from Ubuntu (or any other remote machine), I would suggest:

  • Open up the firewall of your Windows machine to accept outside requests (you should make sure you’re on an internal network and do not open your Windows machine for the entire internet).
  • Install Jupyter or Jupyter labs via pip:
    • python -m pip install jupyterlab

You will need to remote desktop into the Windows machine to launch Jupyter Labs, but this will then allow you to run Python via a web browser.  By default, Jupyter uses the localhost on port 8888, but you can set the Windows IP address to static and launch the web server on this specific IP address.  

~Michael

Reply