Skip to main content
Question

Python Libraries on FME Cloud

  • November 24, 2014
  • 6 replies
  • 48 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?
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.

6 replies

david_r
Celebrity
  • 8391 replies
  • 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

  • 4 replies
  • 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
Celebrity
  • 8391 replies
  • January 8, 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

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


fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • 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+15
  • Contributor
  • 97 replies
  • July 25, 2018

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

 

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