Comments and answers for "Python Libraries on FME Cloud" https://knowledge.safe.com/questions/4164/python-libraries-on-fme-cloud.html The latest comments and answers for the question "Python Libraries on FME Cloud" Comment by gerhardatsafe on gerhardatsafe's comment https://knowledge.safe.com/comments/75296/view.html Please check out this Q&A: https://knowledge.safe.com/questions/52034/r-packages-and-python-libraries-are-available-on-f.html

星期五,2018年7月27日21:48:56格林尼治时间 gerhardat亚搏在线safe
Comment by jeroen on jeroen's answer https://knowledge.safe.com/comments/75079/view.html
Does this methode work for FME Cloud (and R)?
Wed, 25 Jul 2018 11:49:48 GMT jeroen
Answer by aaronkoning https://knowledge.safe.com/answers/22048/view.html

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.
Fri, 08 Jan 2016 17:58:33 GMT aaronkoning
Comment by david_r on david_r's answer https://knowledge.safe.com/comments/22004/view.html

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

Fri, 08 Jan 2016 09:11:35 GMT david_r
Answer by pm https://knowledge.safe.com/answers/21975/view.html

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
Thu, 07 Jan 2016 21:13:22 GMT pm
Answer by david_r https://knowledge.safe.com/answers/11281/view.html 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
Mon, 24 Nov 2014 08:33:18 GMT david_r