Skip to main content

I have the following problem: In my FME workbench I need Python and additional Python modules. Because a few of them cannot be installed with fme easy_install and the FME python interpreter does not accept modules which are manually installed I decided to install Python 2.7 indepently from FME and use its python interpreter.

 

So I installed Python, installed the modules, tested it in the shell by importing the modules and it worked. Then I followed the instruction on https://knowledge.safe.com/articles/814/choosing-a-different-python-interpreter-installati.html and chose the python27.dll instead of the standarized fme python.dll. After that also I tested to import the modules in FME by scripting a Startup Python script but here it says that the modules could not be found.

 

What could be the problem?

Consider setting the PYTHONHOME environment variable so that it points to your chosen Python installation, e.g.

PYTHONHOME=C:\Python27


Hello @david_r

I setted all the python variables as it should be:

  • Path=........D:\Programme\Python27\;D:\Programme\Python27\Scripts
  • PYTHONHOME=D:\Programme\Python27
  • PYTHONPATH=D:\Programme\Python27

And I also setted the C:/SystemWOW64/python27.dll as the preferred python interpreter.

As a test I opened a new workbench, and implemented a simple python script. Somehow FME uses the wrong .dll (not the one I setted in the FME Options) and the wrong PYTHONHOME although it was setted the right way and I don't know why. Aditionally there is a message 'The user-specified library D:\Programme\FME\fme.exe could not be loaded' in the log file. The whole logifle:

...

START - ProcessID: 10532,
peak process memory usage: 30908 kB, current process memory usage: 30832 kB 

FME Configuration: Command
line arguments are `D:\Programme\FME\fme.exe'
`C:\Users\User1\AppData\Local\Temp\3\wb-xlate-XXXXXXX'
`LOG_STANDARDOUT' `YES' `LogCountServerName'
`{XXXXXXX-XXXXXXX-XXXXXXXX}' 

The User-specified library
D:\Programme\FME\fme.exe could not be loaded 

Using Python interpreter
from `D:\Programme\FME\fmepython27\python27.dll' with PYTHONHOME
`D:\Programme\FME\fmepython27' 

Python version 2.7 loaded
successfully 

... 

You have to really verify that all your components are either 32- or 64-bits, you cannot mix them:

 

  • FME
  • Python as specified by PYTHONHOME
  • Python.dll

 


Hello @david_r

I setted all the python variables as it should be:

  • Path=........D:\Programme\Python27\;D:\Programme\Python27\Scripts
  • PYTHONHOME=D:\Programme\Python27
  • PYTHONPATH=D:\Programme\Python27

And I also setted the C:/SystemWOW64/python27.dll as the preferred python interpreter.

As a test I opened a new workbench, and implemented a simple python script. Somehow FME uses the wrong .dll (not the one I setted in the FME Options) and the wrong PYTHONHOME although it was setted the right way and I don't know why. Aditionally there is a message 'The user-specified library D:\Programme\FME\fme.exe could not be loaded' in the log file. The whole logifle:

...

START - ProcessID: 10532,
peak process memory usage: 30908 kB, current process memory usage: 30832 kB 

FME Configuration: Command
line arguments are `D:\Programme\FME\fme.exe'
`C:\Users\User1\AppData\Local\Temp\3\wb-xlate-XXXXXXX'
`LOG_STANDARDOUT' `YES' `LogCountServerName'
`{XXXXXXX-XXXXXXX-XXXXXXXX}' 

The User-specified library
D:\Programme\FME\fme.exe could not be loaded 

Using Python interpreter
from `D:\Programme\FME\fmepython27\python27.dll' with PYTHONHOME
`D:\Programme\FME\fmepython27' 

Python version 2.7 loaded
successfully 

... 
You have to really verify that all your components are either 32- or 64-bits, you cannot mix them:

 

  • FME
  • Python as specified by PYTHONHOME
  • Python.dll

 


You have to really verify that all your components are either 32- or 64-bits, you cannot mix them:

 

  • FME
  • Python as specified by PYTHONHOME
  • Python.dll

 

That was the problem! Thank you so much!

 

 


Reply