Skip to main content
Solved

Installed Python package not found

  • March 1, 2023
  • 7 replies
  • 750 views

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

lifalin2016
Supporter
Forum|alt.badge.img+38
  • Supporter
  • 592 replies
  • March 1, 2023

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
  • 22 replies
  • 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
  • Author
  • Contributor
  • 69 replies
  • March 2, 2023

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

 


david_r
Celebrity
  • 8392 replies
  • March 2, 2023

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
  • Author
  • Contributor
  • 69 replies
  • March 2, 2023

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+21
  • Safer
  • 648 replies
  • Best Answer
  • March 2, 2023

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
  • Author
  • Contributor
  • 69 replies
  • March 3, 2023

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