Question

Issue with python import numpy in FME Flow 2023

  • 20 July 2023
  • 5 replies
  • 34 views

Hi,

 

I have an issue with import numpy in Python Startup Script in FME Workspace in FME Flow:

 

FME Flow 2023.0.1

uild 23332 - win64

 

I guess that numpy package is already installed in FME Flow (and Form).

In FME Form there is no issue but when I publish workspace on FME Flow I get:

 

Python Exception <ImportError>:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for

many reasons, often due to issues with your setup or how NumPy was

installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

* The Python version is: Python3.11 from "C:\\Program Files\\FMEFlow\\Server\\fme\\FMEEngine.exe"

* The NumPy version is: "1.24.2"

and make sure that they are the versions you expect.

Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.

 

In previous FME 2022 everything worked fine.

 

Thanks for help


5 replies

Badge +9

Hi @michpil​ ,

 

I replied to your case but if anyone else is encountering this please create a support case here. We can walk you through a workaround.

Hi @michpil​ ,

 

I replied to your case but if anyone else is encountering this please create a support case here. We can walk you through a workaround.

Thanks for your support (workaround fixed issue)

Badge +3

I have the same issue & have created a support case for a workaround. It would be nice to also have the workaround posted here so we don't have to wait for support to continue!

I have the same issue & have created a support case for a workaround. It would be nice to also have the workaround posted here so we don't have to wait for support to continue!

FROM SUPPORT:

If you compare the Numpy folder in Form and Flow, it looks like the Flow instance is missing the .libs folder. 

numpy_issueIf you copy the .libs folder from Form to Flow, then restart the FME Flow engines this should fix the issue.

I've written out the steps below:

  1. Go to the numpy Python folder for FME Form (by default this folder will be located here: C:\\Program Files\\FME\\python\\python311\\numpy)
  2. Copy the .libs folder
  3. Paste it in the numpy Python folder for FME Flow (by default this folder will be located here: C:\\Program Files\\FMEFlow\\Server\\fme\\python\\python311\\numpy)
  4. Go to Windows Services and right-click to restart the FME Server Engines 
  5. Try running the Python workspace again to see if it works

 

Badge +9

I have the same issue & have created a support case for a workaround. It would be nice to also have the workaround posted here so we don't have to wait for support to continue!

Hi @marnickcle​ ,

 

Sorry about the inconvenience. I was nervous about posting the solution publicly as it does require users to copy folders from between two different FME products. This might cause issues if the user is not on the same version of Form and Flow as we often see in support. This might cause issues that are harder to diagnose for our support team.

 

If you do choose to use this workaround please ensure that the versions of FME Flow and Form are the same.

Reply