Overview
Forum
Mango
iMango
Papaya
Multi-image Analysis GUI
Board Index
Register
Login
Logout
Settings

How to import external Python modules?

Questions or comments about Mango, webMango, iMango or Papaya.

Moderator: Michael Martinez

How to import external Python modules?

Postby iPadawan » Fri Sep 02, 2016 6:17 am

Hi.As obj: how to import in script external Python modules (numpy, nibabel, scipy... Etc)?
Tnx :)
iPadawan
 
Posts: 3
Joined: Fri Sep 02, 2016 4:37 am

Re: How to import external Python modules?

Postby Michael Martinez » Fri Sep 09, 2016 1:19 pm

This has been asked before, but I'm afraid I don't know the answer. Mango uses the Jython implementation Python. Perhaps Jython would be a place to start. Let me know if you figure out a way to do this.
Michael Martinez
 
Posts: 582
Joined: Fri Jul 06, 2007 8:53 am

Re: How to import external Python modules?

Postby emergency_rose » Mon Apr 03, 2017 5:54 pm

iPadawan wrote:Hi.As obj: how to import in script external Python modules (numpy, nibabel, scipy... Etc)?
Tnx :)

To import extension package, you need to find the .jar version of the module, then add the path using the following scripts:
Code: Select all
import sys
sys.path.append('../xx.jar')

There is no python version of bumpy, nibble or scipy as far as I know, but according to what you need, you can find the replacement. There is jnumeric which can achieve part of the function of numpy. For nibabel, you can just use the Mango API to process image.
Hope it's helpful!
emergency_rose
 
Posts: 3
Joined: Mon Apr 03, 2017 4:50 pm

Re: How to import external Python modules?

Postby ProfMJonesScD » Thu Oct 05, 2017 10:34 am

Just the information I was looking for, been battling with that for a while, thanks!
ProfMJonesScD
 
Posts: 1
Joined: Thu Oct 05, 2017 10:31 am


Return to Mango

Who is online

Users browsing this forum: No registered users and 1 guest

cron