Skip to main content
Question

Python - Update standard NumPy lib


roberto
Contributor
Forum|alt.badge.img+6

Hello,

I'm trying to install Pandas lib but it depends from a NumPy version newer than the one installed with FME (1.15.1). Pandas pip installation includes the correct NumPy library but the script fails because FME looks in the default \\FME2020\\python\\python37 folder instead of the custom one.

Is it possible (without side effects) to upgrade that library?

Thanks

Roberto

4 replies

Forum|alt.badge.img+1
  • October 21, 2020

Hi Roberto,

 

I've asked a similar question a while ago on this forum and the feedback that I received was that generally speaking it's not a good idea to upgrade specific python libraries within FME.

Have you tried using a different python interpreter in FME?

https://community.safe.com/s/article/choosing-a-different-python-interpreter-installati


roberto
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 21, 2020
kd wrote:

Hi Roberto,

 

I've asked a similar question a while ago on this forum and the feedback that I received was that generally speaking it's not a good idea to upgrade specific python libraries within FME.

Have you tried using a different python interpreter in FME?

https://community.safe.com/s/article/choosing-a-different-python-interpreter-installati

Hi @kd​ ,

I will go for a different Python interpreter as soon as possible. I think it is a good compromise. For now, I need to stay for the standard one because of both 2.7 and 3.7 versions in FME Server.


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • October 21, 2020

@roberto​ , I'm not sure in what order of precedence it gets checked or cascaded to the Python interpreter, but you could instead try installing Pandas and its dependencies to the FME project folder itself with

> pip install pandas -target FMEProjectFolderPath and hopefully also install the correct version of NumPy here as well.

 

Executing a Python script within a workflow from a FMW file stored in FMEProjectFolderPath may check here first for Python modules and dependencies and avoid needing to play with interpreter path settings.


debbiatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • October 23, 2020

Hi @roberto​ 

As @kd​  mentioned, it is not recommended to upgrade the shipped modules.

 

If you do not need to use the latest version of the pandas module, you can try downloading an older version that is compatible with the shipped numpy module. For example, downloading pandas version 1.0.5 will work as it requires numpy 1.13.3 and higher. You can do so with this command:

fme python -m pip install pandas==1.0.5 --target <your_target_path>

I hope this helps.


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