Using SciPy in application

R

Roozbeh

Hi all,

I want to use spline interpolation function from SciPy in an application and at the same time, I don't want the end user to have to install SciPy separately. Is there a way around this problem?

Thanks in advance for your help
 
O

Oscar Benjamin

I want to use spline interpolation function from SciPy in an application and at the same time, I don't want the end user to have to install SciPy separately. Is there a way around this problem?

They cannot use the function from scipy if scipy is not installed.
There are three ways round this problem:
1) Rewrite the interpolation function you need in your own code.
2) Require the user to install scipy.
3) Require the user to install some other package that has
interpolation functions.

Rewriting the interpolation function is probably not that difficult
depending on the type of interpolation you're using.


Oscar
 
R

Robert Kern

They cannot use the function from scipy if scipy is not installed.
There are three ways round this problem:
1) Rewrite the interpolation function you need in your own code.

Variant:

1.a) Copy the interpolation code from scipy into your own code.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
R

Roozbeh

On Wednesday, April 24, 2013 11:13:45 AM UTC+2, Roozbeh wrote: > Hi all, I want to use spline interpolation function from SciPy in an application and at the same time, I don't want the end user to have to install SciPy separately. Is there a way around this problem? Thanks in advance for your help
 
R

Roozbeh

Hi all, I want to use spline interpolation function from SciPy in an application and at the same time, I don't want the end user to have to install SciPy separately. Is there a way around this problem? Thanks in advance for your help

The thing is that the SciPy code for spline interpolation imports NumPy which also I don't want to use. So, I think I will have to write the code myself I guess.
 
R

Roozbeh

Hi all, I want to use spline interpolation function from SciPy in an application and at the same time, I don't want the end user to have to install SciPy separately. Is there a way around this problem? Thanks in advance for your help

Any idea where can I find the recipe for the spline interpolation that does not rely on NumPy and/or SciPy and is written pure Python (no C code)?
 
R

Robert Kern

Any idea where can I find the recipe for the spline interpolation that does not rely on NumPy and/or SciPy and is written pure Python (no C code)?

If Google can't find it, it probably doesn't exist. Very few people would do
this without numpy.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
A

Alex van der Spek

On Wed, 24 Apr 2013 04:34:44 -0700, Roozbeh wrote:

The scipy interpolation routines (splev, splrep, etc.) are on netlib:

http://www.netlib.org/dierckx/

This gives you FORTRAN source codes which you will have to compile
yourself to either a DLL or an SO. Call them from python using ctypes.

I have done that for a number of the dierckx routines. No problems at all.

Hope this helps,
Alex van der Spek
 
M

Miki Tebeka

I want to use spline interpolation function from SciPy in an application and at the same time, I don't want the end user to have to install SciPy separately.
You can pack you application with py2exe, pyinstaller ... and then they won't even need to install Python.

Another option (which is not always possible) is to make you application a web site and then only you need to install SciPy on the server.
 
R

Roozbeh

I thought about the py2exe option but the problem is, this application is aplug-in written for Abaqus CAE and hence it will use the python version that comes with Abaqus CAE distribution and Abaqus must be able to compile the Python codes every time on the start-up otherwise it won't recognize the plug-in and thats why SciPy and NumPy are also not an option.
I guess as Alex said, I will have to use DLLs or write it myself.
 
G

Grant Edwards

I want to use spline interpolation function from SciPy in an
application and at the same time, I don't want the end user to have
to install SciPy separately. Is there a way around this problem?

You could bundle you app along with python and SciPy and whatever
other libraries are required using py2exe, py2app, cx_Freeze, Freeze,
etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top