Jump to content

GOM 2018 Python Numpy & Pandas Install


---
 Share

Recommended Posts

Hello,

I am using GOM 2018 and was wondering if it was possible to install both numpy and pandas. I have previously done this for ZEISS INSPECT 2025 using a script and had it working but I do not believe that the API is available for the 2018 version. Any tips or answers? Or is it not possible since there is no gom.api for this version?

Link to comment
Share on other sites

Kylea,

I haven't tried to import numpy and pandas specifically, but I did have success importing openpyxl into my old GOM 2018 scripts using the following method:

  1. Install Python 3.7.2 (I believe this is the version used natively by GOM 2018, might be a little older) from the official python development website onto your scan PC. This python environment exists in parallel with GOM's.
  2. Install the modules you need (pandas, numpy, etc.) into this new Python 3.7.2 environment via pip, or whatever method you're most familiar with.
  3. In your GOM 2018 script, add the below sequence of import statements. This allowed me to bootstrap openpyxl into the GOM interpreter. It should hopefully work for your modules as well:
import sys
sys.path.append ("D:\\Users\\user\\Python372\\Lib\\site-packages") #Replace this with the path to the site-packages folder of your new Python 3.7.2 install
import openpyxl #Replace this with pandas, numpy, or whatever other modules you need to try importing

Best of luck!
Michael Henson

Link to comment
Share on other sites

 Share

×
×
  • Create New...