Numpy not imported at load / 4.10.0 with Python Plug-in

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Numpy not imported at load / 4.10.0 with Python Plug-in

Jay L.
List, 

I am running Opticks 4.10.0 with the Python plugin on Red Hat.

Python is version2.6 and Numpy is installed.  

When running a script from a Wizard, it is not possible to import numpy, i.e.

import sys
import opticks
import numpy <----FAILS

To overcome this it is necessary to run 'import numpy' in the opticks scripting window.  Presumably this then puts the numpy module into the process namespace.  Is this intentional or a bug?

Also, Trevor - I see the bad_values argument in create3d class method.  Setting it to anything other than the default (None) causes a seg fault.  The assert list does work, so if I pass an integer it returns an assertion error, but to pass a list causes a crash.

Thanks, 
Jay

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Opticks-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opticks-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Numpy not imported at load / 4.10.0 with PythonPlug-in

tclarke
Administrator

Running this from the wizard or from the scripting window should be identical. When you say wizard, are you using the wizard builder to execute or are you using Opticks Batch? If the later, it’s possible that the it can’t locate the proper python home. What error does it give you when trying to import?

 

From: Jay L. [mailto:[hidden email]]
Sent: Thursday, April 11, 2013 5:03 PM
To: [hidden email]
Subject: [Opticks-users] Numpy not imported at load / 4.10.0 with PythonPlug-in

 

List, 

 

I am running Opticks 4.10.0 with the Python plugin on Red Hat.

 

Python is version2.6 and Numpy is installed.  

 

When running a script from a Wizard, it is not possible to import numpy, i.e.

 

import sys

import opticks

import numpy <----FAILS

 

To overcome this it is necessary to run 'import numpy' in the opticks scripting window.  Presumably this then puts the numpy module into the process namespace.  Is this intentional or a bug?

 

Also, Trevor - I see the bad_values argument in create3d class method.  Setting it to anything other than the default (None) causes a seg fault.  The assert list does work, so if I pass an integer it returns an assertion error, but to pass a list causes a crash.

 

Thanks, 

Jay


This message and any enclosures are intended only for the addressee.  Please 

notify the sender by email if you are not the intended recipient.  If you are 

not the intended recipient, you may not use, copy, disclose, or distribute this 

message or its contents or enclosures to any other person and any such actions 

may be unlawful.  Ball reserves the right to monitor and review all messages 

and enclosures sent to or from this email address.

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Opticks-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opticks-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Numpy not imported at load / 4.10.0 with PythonPlug-in

Jay L.
Trevor, 

It is the former.  I have used the wizard builder to aim at a python script.  I get an import error, module not found.  Presumably this is a PATH issue.  Testing via the command line, import works fine.  This is not occurring with built-in modules (sys, os, etc.).

Thanks, 
Jay


On Thu, Apr 11, 2013 at 2:05 PM, Clarke, Trevor <[hidden email]> wrote:

Running this from the wizard or from the scripting window should be identical. When you say wizard, are you using the wizard builder to execute or are you using Opticks Batch? If the later, it’s possible that the it can’t locate the proper python home. What error does it give you when trying to import?

 

From: Jay L. [mailto:[hidden email]]
Sent: Thursday, April 11, 2013 5:03 PM
To: [hidden email]
Subject: [Opticks-users] Numpy not imported at load / 4.10.0 with PythonPlug-in

 

List, 

 

I am running Opticks 4.10.0 with the Python plugin on Red Hat.

 

Python is version2.6 and Numpy is installed.  

 

When running a script from a Wizard, it is not possible to import numpy, i.e.

 

import sys

import opticks

import numpy <----FAILS

 

To overcome this it is necessary to run 'import numpy' in the opticks scripting window.  Presumably this then puts the numpy module into the process namespace.  Is this intentional or a bug?

 

Also, Trevor - I see the bad_values argument in create3d class method.  Setting it to anything other than the default (None) causes a seg fault.  The assert list does work, so if I pass an integer it returns an assertion error, but to pass a list causes a crash.

 

Thanks, 

Jay

This message and any enclosures are intended only for the addressee.  Please 

notify the sender by email if you are not the intended recipient.  If you are 

not the intended recipient, you may not use, copy, disclose, or distribute this 

message or its contents or enclosures to any other person and any such actions 

may be unlawful.  Ball reserves the right to monitor and review all messages 

and enclosures sent to or from this email address.

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Opticks-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opticks-users



------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Opticks-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opticks-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Numpy not imported at load / 4.10.0 withPythonPlug-in

tclarke
Administrator

A couple of things to try:

-          In Opticks, go to Tools->Options->Scripting->Python Engine and set the Python Home location

-          Set the PYTHONPATH or PYTHONHOME environment variable to point to your install

 

We occasionally see issues with the python engine not finding the external modules (especially on windows) since one of the methods python uses to locate this is to check relative to the current executable’s path. This works fine with the main python interpreter but when argv[0] is opticks it can get confused.

 

From: Jay L. [mailto:[hidden email]]
Sent: Thursday, April 11, 2013 6:46 PM
To: [hidden email]
Subject: Re: [Opticks-users] Numpy not imported at load / 4.10.0 withPythonPlug-in

 

Trevor, 

 

It is the former.  I have used the wizard builder to aim at a python script.  I get an import error, module not found.  Presumably this is a PATH issue.  Testing via the command line, import works fine.  This is not occurring with built-in modules (sys, os, etc.).

 

Thanks, 

Jay

 

On Thu, Apr 11, 2013 at 2:05 PM, Clarke, Trevor <[hidden email]> wrote:

Running this from the wizard or from the scripting window should be identical. When you say wizard, are you using the wizard builder to execute or are you using Opticks Batch? If the later, it’s possible that the it can’t locate the proper python home. What error does it give you when trying to import?

 

From: Jay L. [mailto:[hidden email]]
Sent: Thursday, April 11, 2013 5:03 PM
To: [hidden email]
Subject: [Opticks-users] Numpy not imported at load / 4.10.0 with PythonPlug-in

 

List, 

 

I am running Opticks 4.10.0 with the Python plugin on Red Hat.

 

Python is version2.6 and Numpy is installed.  

 

When running a script from a Wizard, it is not possible to import numpy, i.e.

 

import sys

import opticks

import numpy <----FAILS

 

To overcome this it is necessary to run 'import numpy' in the opticks scripting window.  Presumably this then puts the numpy module into the process namespace.  Is this intentional or a bug?

 

Also, Trevor - I see the bad_values argument in create3d class method.  Setting it to anything other than the default (None) causes a seg fault.  The assert list does work, so if I pass an integer it returns an assertion error, but to pass a list causes a crash.

 

Thanks, 

Jay

 
This message and any enclosures are intended only for the addressee.  Please 
 
notify the sender by email if you are not the intended recipient.  If you are 
 
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions 
 
may be unlawful.  Ball reserves the right to monitor and review all messages 
 
and enclosures sent to or from this email address.


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Opticks-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opticks-users

 


This message and any enclosures are intended only for the addressee.  Please 

notify the sender by email if you are not the intended recipient.  If you are 

not the intended recipient, you may not use, copy, disclose, or distribute this 

message or its contents or enclosures to any other person and any such actions 

may be unlawful.  Ball reserves the right to monitor and review all messages 

and enclosures sent to or from this email address.

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Opticks-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opticks-users
Loading...