Scipy Interpolate module

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Scipy Interpolate module

Prateek Maheshwari
I m trying to make a exe using interpolate of scipy.
Installer is created successfully.
While executing command from cmd on windows it gives following error.




scipyInterpolate.PNG



--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/e105d73e-eb2f-4174-b02f-90c275ddf3bc%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Scipy Interpolate module

Yitzhak Weissman
Same happened to me. Did you find a solution or workaround?

On Monday, January 27, 2020 at 5:46:28 PM UTC+2, Prateek Maheshwari wrote:
I m trying to make a exe using interpolate of scipy.
Installer is created successfully.
While executing command from cmd on windows it gives following error.




scipyInterpolate.PNG



--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/bd1a7321-bc1a-4a12-94f3-2db577c0ede3o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Scipy Interpolate module

bwoodsend

scipy.interpolate is working no problem on my Windows. Scipy is on PyInstaller’s list of packages which may require tight version control. I’m using:

python==3.7.7
PyInstaller==3.6
scipy==1.4.1

I also notice your using Anaconda which rearranges your package structures in a way PyInstaller often can’t follow which can lead to files/packages not being found.

Can you build in 1-dir mode (the default), navigate inside the dist folder and tell me if the scipy pyd files are in there? They should be under dist\your_program\scipy\interpolate. Chances are they're not but it's a place to start.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/fdc99e58-97a1-4da1-a19f-1067f76dc768n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Scipy Interpolate module

Yitzhak Weissman
Thank you very much for your note.
I did what you suggested (a very good idea), and it looks as if the scipy packages are there:
image
 
I launched the .exe file, and it completed without an error. Encouraged, I ran again pyinstaller –F scipytest.py, and the resulting executable also works! I have no idea what happened since day before yesterday when it did not work.
Sine the Python pyinstaller did not work for me, I resorted to the Anaconda pyinstaller which worked fine. I prefer the Python pyinstaller because it runs much faster (about one minute versus a few minutes in Anaconda) and produces much smaller .exe files (about 100MB, versus ~300MB in Anaconda).
I saw indeed warnings in Anaconda documentation against using pip. Since I want to use both Anaconda and Python, I will probably setup two separate machines, one only with Python and the other only with Anaconda.
 
Best,
Itsik
 
From: bwoodsend
Sent: Monday, June 22, 2020 1:36 PM
Subject: [PyInstaller] Re: Scipy Interpolate module
 

scipy.interpolate is working no problem on my Windows. Scipy is on PyInstaller’s list of packages which may require tight version control. I’m using:

python==3.7.7
PyInstaller==3.6
scipy==1.4.1

I also notice your using Anaconda which rearranges your package structures in a way PyInstaller often can’t follow which can lead to files/packages not being found.

Can you build in 1-dir mode (the default), navigate inside the dist folder and tell me if the scipy pyd files are in there? They should be under dist\your_program\scipy\interpolate. Chances are they're not but it's a place to start.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/fdc99e58-97a1-4da1-a19f-1067f76dc768n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/74CAC2604B3F4049A100A922A29D2572%40ITSIKWNEW.
Reply | Threaded
Open this post in threaded view
|

Re: Scipy Interpolate module

bwoodsend

Ughh - an inconsistent bug! Oh well at least it’s working.

As for your larger filesize - that is because of PyInstaller picking up optional dependencies and assuming you need them. The story usually goes:

  • A library you are using either has as a convenience matplotlib visualisation method in it or uses matplotlib somewhere hidden in its test suite. (In scipy’s case its scipy/optimize/_shgo_lib/triangulation.py.)
  • Matplotlib optionally supports every GUI library in existence as a backend to show it’s graphs with - it only needs one but PyInstaller includes all of them (so PyQt5, (deprecated) PyQt4, TKinter, PySide, Pyside2) as well as IPython’s inline-plotting support.
  • IPython uses all sorts of stuff so once PyInstaller sees that it wants to include more or less your entire conda environment.

You can see this chain of inclusion in build/name/xref-name.html. If those modules aren’t installed then they are ignored. This is why you’ll see the advise everywhere to use a clean minimal environment for PyInstaller. Alternatively you can --exclude them. e.g. --exclude matplotlib --exclude PyQt5. Sometimes you can even exclude subpackages such as --exclude scipy.integrate. You can test if your script needs a package outside of PyInstaller by putting sys.modules["package_name"] = None at the top of your script and seeing if it can still run normally. If you don't get an import error, it's usually safe to exclude.

I’d like to track down why your plain Python PyInstaller didn’t work - could you provide more details on that?

Brénainn

On Tuesday, June 23, 2020 at 11:50:50 AM UTC+1 [hidden email] wrote:
Thank you very much for your note.
I did what you suggested (a very good idea), and it looks as if the scipy packages are there:
image
 
I launched the .exe file, and it completed without an error. Encouraged, I ran again pyinstaller –F scipytest.py, and the resulting executable also works! I have no idea what happened since day before yesterday when it did not work.
Sine the Python pyinstaller did not work for me, I resorted to the Anaconda pyinstaller which worked fine. I prefer the Python pyinstaller because it runs much faster (about one minute versus a few minutes in Anaconda) and produces much smaller .exe files (about 100MB, versus ~300MB in Anaconda).
I saw indeed warnings in Anaconda documentation against using pip. Since I want to use both Anaconda and Python, I will probably setup two separate machines, one only with Python and the other only with Anaconda.
 
Best,
Itsik
 
From: bwoodsend
Sent: Monday, June 22, 2020 1:36 PM
Subject: [PyInstaller] Re: Scipy Interpolate module

scipy.interpolate is working no problem on my Windows. Scipy is on PyInstaller’s list of packages which may require tight version control. I’m using:

python==3.7.7
PyInstaller==3.6
scipy==1.4.1

I also notice your using Anaconda which rearranges your package structures in a way PyInstaller often can’t follow which can lead to files/packages not being found.

Can you build in 1-dir mode (the default), navigate inside the dist folder and tell me if the scipy pyd files are in there? They should be under dist\your_program\scipy\interpolate. Chances are they're not but it's a place to start.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/fdc99e58-97a1-4da1-a19f-1067f76dc768n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/6be72ab4-0934-4ad3-a4cc-345808d9f2d4n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Scipy Interpolate module

Chris Barker - NOAA Federal
Just a note:

Anaconda supplies a  complete Python install that is not-very-different than the one from Python.org. And the PyInstaller that it supplies is the same as well (modulo the version).

The one way that Anaconda IS different with regard to PyInstaller is that it supplies compiled C libraries as well, and these may be in different places. Though usually PyInstaller can find them. Another difference is that some versions of Anaconda use the Intel MKL math libs, which can be pretty darn big.

So: most of the differences you are seeing is not due to using Anaconda, but rather something about configuration and PyInstaller version.

-CHB

 




On Tue, Jun 23, 2020 at 8:25 AM bwoodsend <[hidden email]> wrote:

As for your larger filesize - that is because of PyInstaller picking up optional dependencies and assuming you need them. The story usually goes:

  • A library you are using either has as a convenience matplotlib visualisation method in it or uses matplotlib somewhere hidden in its test suite. (In scipy’s case its scipy/optimize/_shgo_lib/triangulation.py.)
  • Matplotlib optionally supports every GUI library in existence as a backend to show it’s graphs with - it only needs one but PyInstaller includes all of them (so PyQt5, (deprecated) PyQt4, TKinter, PySide, Pyside2) as well as IPython’s inline-plotting support.
  • IPython uses all sorts of stuff so once PyInstaller sees that it wants to include more or less your entire conda environment.

You can see this chain of inclusion in build/name/xref-name.html. If those modules aren’t installed then they are ignored. This is why you’ll see the advise everywhere to use a clean minimal environment for PyInstaller. Alternatively you can --exclude them. e.g. --exclude matplotlib --exclude PyQt5. Sometimes you can even exclude subpackages such as --exclude scipy.integrate. You can test if your script needs a package outside of PyInstaller by putting sys.modules["package_name"] = None at the top of your script and seeing if it can still run normally. If you don't get an import error, it's usually safe to exclude.

I’d like to track down why your plain Python PyInstaller didn’t work - could you provide more details on that?

Brénainn

On Tuesday, June 23, 2020 at 11:50:50 AM UTC+1 [hidden email] wrote:
Thank you very much for your note.
I did what you suggested (a very good idea), and it looks as if the scipy packages are there:
image
 
I launched the .exe file, and it completed without an error. Encouraged, I ran again pyinstaller –F scipytest.py, and the resulting executable also works! I have no idea what happened since day before yesterday when it did not work.
Sine the Python pyinstaller did not work for me, I resorted to the Anaconda pyinstaller which worked fine. I prefer the Python pyinstaller because it runs much faster (about one minute versus a few minutes in Anaconda) and produces much smaller .exe files (about 100MB, versus ~300MB in Anaconda).
I saw indeed warnings in Anaconda documentation against using pip. Since I want to use both Anaconda and Python, I will probably setup two separate machines, one only with Python and the other only with Anaconda.
 
Best,
Itsik
 
From: bwoodsend
Sent: Monday, June 22, 2020 1:36 PM
Subject: [PyInstaller] Re: Scipy Interpolate module

scipy.interpolate is working no problem on my Windows. Scipy is on PyInstaller’s list of packages which may require tight version control. I’m using:

python==3.7.7
PyInstaller==3.6
scipy==1.4.1

I also notice your using Anaconda which rearranges your package structures in a way PyInstaller often can’t follow which can lead to files/packages not being found.

Can you build in 1-dir mode (the default), navigate inside the dist folder and tell me if the scipy pyd files are in there? They should be under dist\your_program\scipy\interpolate. Chances are they're not but it's a place to start.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/fdc99e58-97a1-4da1-a19f-1067f76dc768n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/6be72ab4-0934-4ad3-a4cc-345808d9f2d4n%40googlegroups.com.


--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[hidden email]

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/CALGmxELCnKfCqQW%2BpAUH3q5%2B5eK1bR%2BSiRHMreW7%2BcJKtQXnQw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Scipy Interpolate module

Yitzhak Weissman
In reply to this post by bwoodsend
Brénainn,
Thank you very much for the valuable information. I will try your tips.
Unfortunately, I am not able to reproduce the scipy interpolate module error. So I cannot provide any more details.
I tried to import the second package that I am using: ‘from skimage.transform import warp’. This script runs smoothly on my Python interpreter:
image
However, pyinstaller failed to compile it:
image
The anaconda pyinstaller (ipyinstaller?) accomplished the task gracefully.
I am trying to develop a commercial software package. I feel quite confident with the scripting phase, but I see that I need help with the compilation. I wonder, is there anybody here who can help me with the compilation process as a freelancer?
 
Best,
Itsik
 
From: bwoodsend
Sent: Tuesday, June 23, 2020 6:04 PM
Subject: Re: [PyInstaller] Re: Scipy Interpolate module
 

Ughh - an inconsistent bug! Oh well at least it’s working.

As for your larger filesize - that is because of PyInstaller picking up optional dependencies and assuming you need them. The story usually goes:

  • A library you are using either has as a convenience matplotlib visualisation method in it or uses matplotlib somewhere hidden in its test suite. (In scipy’s case its scipy/optimize/_shgo_lib/triangulation.py.)
  • Matplotlib optionally supports every GUI library in existence as a backend to show it’s graphs with - it only needs one but PyInstaller includes all of them (so PyQt5, (deprecated) PyQt4, TKinter, PySide, Pyside2) as well as IPython’s inline-plotting support.
  • IPython uses all sorts of stuff so once PyInstaller sees that it wants to include more or less your entire conda environment.

You can see this chain of inclusion in build/name/xref-name.html. If those modules aren’t installed then they are ignored. This is why you’ll see the advise everywhere to use a clean minimal environment for PyInstaller. Alternatively you can --exclude them. e.g. --exclude matplotlib --exclude PyQt5. Sometimes you can even exclude subpackages such as --exclude scipy.integrate. You can test if your script needs a package outside of PyInstaller by putting sys.modules["package_name"] = None at the top of your script and seeing if it can still run normally. If you don't get an import error, it's usually safe to exclude.

I’d like to track down why your plain Python PyInstaller didn’t work - could you provide more details on that?

Brénainn

On Tuesday, June 23, 2020 at 11:50:50 AM UTC+1 [hidden email] wrote:
Thank you very much for your note.
I did what you suggested (a very good idea), and it looks as if the scipy packages are there:
image
 
I launched the .exe file, and it completed without an error. Encouraged, I ran again pyinstaller –F scipytest.py, and the resulting executable also works! I have no idea what happened since day before yesterday when it did not work.
Sine the Python pyinstaller did not work for me, I resorted to the Anaconda pyinstaller which worked fine. I prefer the Python pyinstaller because it runs much faster (about one minute versus a few minutes in Anaconda) and produces much smaller .exe files (about 100MB, versus ~300MB in Anaconda).
I saw indeed warnings in Anaconda documentation against using pip. Since I want to use both Anaconda and Python, I will probably setup two separate machines, one only with Python and the other only with Anaconda.
 
Best,
Itsik
 
From: bwoodsend
Sent: Monday, June 22, 2020 1:36 PM
Subject: [PyInstaller] Re: Scipy Interpolate module

scipy.interpolate is working no problem on my Windows. Scipy is on PyInstaller’s list of packages which may require tight version control. I’m using:

python==3.7.7
PyInstaller==3.6
scipy==1.4.1

I also notice your using Anaconda which rearranges your package structures in a way PyInstaller often can’t follow which can lead to files/packages not being found.

Can you build in 1-dir mode (the default), navigate inside the dist folder and tell me if the scipy pyd files are in there? They should be under dist\your_program\scipy\interpolate. Chances are they're not but it's a place to start.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/fdc99e58-97a1-4da1-a19f-1067f76dc768n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/6be72ab4-0934-4ad3-a4cc-345808d9f2d4n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/5864B074D8EB41E880566588BF9E0E32%40ITSIKWNEW.
Reply | Threaded
Open this post in threaded view
|

Re: Scipy Interpolate module

bwoodsend

Thanks Chris for sharing that. It’s been a while since I used Anaconda.

Itsik, I tried from skimage.transform import warp’ on my plain Python and it’s worked fine. Could you give us the full traceback rather than a screenshot. If you find copying awkward in cmd you can pipe stderr to a file by appending > errors.txt 2>&1 to your command.

Freelancing does happen on here occasionally. You can post another question called Bounty $100 - please fix my PyInstaller program for me or something and you’ll probably get someone. Although we’d rather fix the problem permanently for everyone by either patching PyInstaller or writing a hook for a particular troublesome package. Then, if you’ve got cash you’re willing to throw around, the PyInstaller core team are always desperate for funding.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/8a5f887f-77aa-4b6f-bc27-b9d680fe7b35n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

skimage test

Yitzhak Weissman
Brénainn,
Thank you again for your continuing support. I attach the PyInstaller log for my script: 'from skimage.transform import warp'.
Actually, I have already researched this problem and found others who encountered it too. A few workarounds were suggested, but all look complicated and none guaranteed to work. Anyway, I do not have the tools to edit spec files.
As I said, the Anaconda pyinstaller worked well with this script.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/0c368a8e-eaf6-426b-b996-caed1f6bbd28o%40googlegroups.com.

skimagetest_log.txt (182K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: skimage test

Yitzhak Weissman
Some time has passed, and the problem is now solved. I found out how to edit the spec file, and increased the iteration limit. I apologize for distracting this community with a rookie problems.
 
Sent: Monday, June 29, 2020 2:11 PM
Subject: [PyInstaller] skimage test
 
Brénainn,
Thank you again for your continuing support. I attach the PyInstaller log for my script: 'from skimage.transform import warp'.
Actually, I have already researched this problem and found others who encountered it too. A few workarounds were suggested, but all look complicated and none guaranteed to work. Anyway, I do not have the tools to edit spec files.
As I said, the Anaconda pyinstaller worked well with this script.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/0c368a8e-eaf6-426b-b996-caed1f6bbd28o%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/7FEEE74A31574CA4B05E6D798A2CE173%40DAZ.