Skip to main content
Solved

Installed Python package not found


nedwaterman
Contributor
Forum|alt.badge.img+9

Hello,

I have pip installed a python package to FME Desktop using the advice on the site:

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Desktop/Workbench/Installing-Python-Packages.htm

The package shows in the correct folder:

imageHowever when I try to import the package into the PythonCreator FME tells me it doesn't exist:

imageCan anyone please tell me what I am doing wrong?

Thank you

Best answer by debbiatsafe

Hello @nedwaterman​ 

Did you use an elevated command prompt to install the Python package using pip? We've had previous reports where a similar error occurs when packages are installed as an administrator (elevated privileges) but FME Desktop was not run as an administrator. It creates a file permission issue on the user directory in which the Python modules are installed.

View original
Did this help you find an answer to your question?

lifalin2016
Contributor
Forum|alt.badge.img+29

Hi Ned.

Is the folder included in the PYTHON_PATH environment variable ?

FME also adds some folders automatically to this variable during runtime, which you can see in the top of the log file when running a workspace.

Beware of Python versions. Not all modules work in all versions.


notmyname
Participant
Forum|alt.badge.img
  • Participant
  • March 1, 2023

A common issue I have had is FME Python and external Python version compatibilities. If you have non-compatible versions there is a little warning in the log file that FME is ignoring the non-compatible version and reverting to the native version. This occurs when setting a preferred python interpreter. If the package is not compatible I don't know if you would get a message or not.


nedwaterman
Contributor
Forum|alt.badge.img+9

Thanks both for the replies - I will check all this out and see if that fixes the issue!

 


david_r
Evangelist

Seeing that this version of MButil dates from 2017, I'm suspecting it might not support Python 3. Perhaps try installing the package into the Python27 subfolder and setting the workspace Python version to 2.7 (won't be compatible with FME 2022+).


nedwaterman
Contributor
Forum|alt.badge.img+9

Thanks David - I have tried that in FME 2021 but am still getting the same message. It might be that it has not successfully installed, so I will check with my python expert, as I'm not one.

 


debbiatsafe
Safer
Forum|alt.badge.img+20

Hello @nedwaterman​ 

Did you use an elevated command prompt to install the Python package using pip? We've had previous reports where a similar error occurs when packages are installed as an administrator (elevated privileges) but FME Desktop was not run as an administrator. It creates a file permission issue on the user directory in which the Python modules are installed.


nedwaterman
Contributor
Forum|alt.badge.img+9

Ah - no I didn't. I'll give this a try and see if it fixes the issue. Thanks for the tip!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings