Skip to main content
Question

Python Libraries on FME Cloud

  • November 24, 2014
  • 6 replies
  • 32 views

My workspace relies on some non-standard python libraries, is there a way to either include these in my workspace when I push to FME Server on the FME Cloud, or otherwise install these python modules on the FME Cloud?

6 replies

david_r
Evangelist
  • November 24, 2014
Hi,

 

 

sorry, I don't think that's possible without the intervention of Safe.

 

 

Contact their support (https://safecommunity.force.com/knowledgeSubmitCase) and ask.

 

 

David

  • January 7, 2016

I have gotten this to work recently without intervention. 

Firstly, download the python source code for the library you want to upload (i.e. don't pip install it). 

On a linux machine (I used ubuntu-14.04.3-desktop-amd64 on a virtual machine), compile the library by navigating the library root folder and

 sudo python setup.py install

It will display the site-packages folder that it creates the library files in. 

What you will need to do after this is upload the entire library folder (for example pandas) to the Resources>Engine>Plugins>Python>Python27 folder on FME Cloud. Navigate to that folder, highlight Python27, then click "upload" in the top left of the resources container. Once there upload the folder. Now you can call it as you would normally in your python script using

import

david_r
Evangelist
  • January 8, 2016
pm wrote:

I have gotten this to work recently without intervention. 

Firstly, download the python source code for the library you want to upload (i.e. don't pip install it). 

On a linux machine (I used ubuntu-14.04.3-desktop-amd64 on a virtual machine), compile the library by navigating the library root folder and

 sudo python setup.py install

It will display the site-packages folder that it creates the library files in. 

What you will need to do after this is upload the entire library folder (for example pandas) to the Resources>Engine>Plugins>Python>Python27 folder on FME Cloud. Navigate to that folder, highlight Python27, then click "upload" in the top left of the resources container. Once there upload the folder. Now you can call it as you would normally in your python script using

import

Thanks for posting, this functionality has indeed been much improved since my original reply.


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • January 8, 2016

Here are some instructions I wrote up previously.

 

Example

https://pypi.python.org/pypi/PyExecJS

Instructions

FME Desktop:

  • Open command prompt
  • cd to directory with where setup.py is located
    • Windows: fme.exe python easy_install PyExecJs
    • Linux: fme python easy_install PyExecJs

https://www.dropbox.com/s/zi09xcgus1ysten/Screenshot%202015-08-28%2017.24.49.png?dl=0

FME Server:

  • Use FME Desktop to install your package.
  • Find the Python site-packages directory
    • Windows: (FMEDir)\\python\\python27 (?)
    • Mac: /Library/Python/2.7/site-packages
  • locate the directory that contains the init.pyc and main.pyc files for your package
  • Open Web UI > Resources > Engine > Plugins > python > python27
  • Upload the directory with the .pyc files.

jeroen
Contributor
Forum|alt.badge.img+8
  • Contributor
  • July 25, 2018
fmelizard wrote:

Here are some instructions I wrote up previously.

 

Example

https://pypi.python.org/pypi/PyExecJS

Instructions

FME Desktop:

  • Open command prompt
  • cd to directory with where setup.py is located
    • Windows: fme.exe python easy_install PyExecJs
    • Linux: fme python easy_install PyExecJs

https://www.dropbox.com/s/zi09xcgus1ysten/Screenshot%202015-08-28%2017.24.49.png?dl=0

FME Server:

  • Use FME Desktop to install your package.
  • Find the Python site-packages directory
    • Windows: (FMEDir)\\python\\python27 (?)
    • Mac: /Library/Python/2.7/site-packages
  • locate the directory that contains the init.pyc and main.pyc files for your package
  • Open Web UI > Resources > Engine > Plugins > python > python27
  • Upload the directory with the .pyc files.

 

Does this methode work for FME Cloud (and R)?

Forum|alt.badge.img
jeroen wrote:

 

Does this methode work for FME Cloud (and R)?
Please check out this Q&A;: https://knowledge.safe.com/questions/52034/r-packages-and-python-libraries-are-available-on-f.html

 

 


Reply


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