It is currently Mon Sep 21, 2026 7:21 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Numpy and Scipy
PostPosted: Thu Oct 22, 2015 11:41 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
GIMP Version: 2.8.14
Operating System: Windows
GIMP Experience: Basic Level



which is the easiest and safest way to install those two additional python packages?
by going thru Gimp-chat posts I see that Mareroq has installed Numpy using the related win32-superpack for python 2.7 (sourceforge), so two questions: 1) it's just enough to run that .exe? 2) does it work on a win-64bits system?
Concerning the Scipy I see that the superpack (sourceforge) is available only for Python 3.3, not 2.7 (the one installed and used by Gimp); is it available elsewhere?
thanks

_________________
"Where am I ?"


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Numpy and Scipy
PostPosted: Thu Oct 22, 2015 6:49 pm  (#2) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14206
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
dinasset wrote:
GIMP Version: 2.8.14
Operating System: Windows
GIMP Experience: Basic Level



which is the easiest and safest way to install those two additional python packages?
by going thru Gimp-chat posts I see that Mareroq has installed Numpy using the related win32-superpack for python 2.7 (sourceforge), so two questions: 1) it's just enough to run that .exe? 2) does it work on a win-64bits system?
Concerning the Scipy I see that the superpack (sourceforge) is available only for Python 3.3, not 2.7 (the one installed and used by Gimp); is it available elsewhere?
thanks

You lost me at "Mareroq". :oops:
:puzzled

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Fri Oct 23, 2015 12:26 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
Wallace, look at viewtopic.php?f=9&t=12088&hilit=numpy
Gimp Scripts and Plugins Topic: Help call levels inside c plugin Posted: 08 Mar 2015, 06:04 (#15)

_________________
"Where am I ?"


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Fri Oct 23, 2015 12:30 am  (#4) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14206
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
dinasset wrote:
Wallace, look at viewtopic.php?f=9&t=12088&hilit=numpy
Gimp Scripts and Plugins Topic: Help call levels inside c plugin Posted: 08 Mar 2015, 06:04 (#15)

I see what you're saying, but it's beyond my knowledge.
Image

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Fri Oct 23, 2015 1:57 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2648
Location: Poland
Hi dinasset.

numpy-1.9.2-win32-superpack-python2.7 exe this only installer 32 bit for numpy-1.9.2
Download numpy-1.9.2.zip, unpack and copy for Python27\Lib\site-packages\

_________________
Image


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Fri Oct 23, 2015 4:51 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
thanks, MareroQ
I did it, but the unzipped content seems to be more a package for compiling than an executable.
Nevertheless I moved that package under GIMP 2/Python/Lib/site-packages.
After restarting Gimp I tried to say on the Python Console:
import numpy as np
but it says it doesn't exist

_________________
"Where am I ?"


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Fri Oct 23, 2015 5:09 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
(addendum)
if I extract only the folder numpy (from the unzipped package numpy-1.9.2) and set that one in site-packages, I get this error from the console
>>> import numpy
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Program Files\GIMP 2\Python\lib\site-packages\numpy\__init__.py", line 160, in <module>
raise ImportError(msg)
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.

_________________
"Where am I ?"


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Fri Oct 23, 2015 5:28 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2648
Location: Poland
I'm sorry - it works well for win32.
It should work well for 64bit.
The only question is - what's your version of Python?

_________________
Image


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Fri Oct 23, 2015 6:09 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
2.7 (I have only the one included in Gimp 2)

_________________
"Where am I ?"


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Fri Oct 23, 2015 6:12 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
I gave a look into the content of the superpack for win-32: it includes ONLY .exe, not sources to compile
So probably I need a superpack for win-64

_________________
"Where am I ?"


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Mon Feb 27, 2017 2:19 am  (#11) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4554
Location: Canada
any success on this?

I would love to be able to use numpy and neurolab libraries in GIMP.
If possible to do that with GIMP. I would pre-train a network outside GIMP.
Then once the network is trained to recognize stroke directions.
I'd like to try using GIMP and call sample average colors on selections and paint with that color in the recognized stroke directions.
I am curious to see the result involving a neural net.

_________________
Image
Visualize your and others dreams coming true.


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Mon Feb 27, 2017 3:23 am  (#12) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
In Windows the additional libraries for Python are installed using pip. To install pip see here.

For specific python questions, python-forum.io is a good place. There is also StackOverflow.

_________________
Image


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Fri Mar 31, 2017 3:14 pm  (#13) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4554
Location: Canada
thanks ofnuts.
With your pointer in the right direction,
I was able to install numpy for GIMP's version of Python now and i can include numpy inside GIMP's python plug-ins.
On my other laptop (that recently died) I was only able to install numpy for my own version of installed Python and not GIMP's version of Python.
more details of my steps here: https://gimplearn.net/viewtopic.php?t=529
Hopefully, this helps you dinasset if you haven't already done it.

_________________
Image
Visualize your and others dreams coming true.


Last edited by trandoductin on Wed Nov 28, 2018 11:37 am, edited 1 time in total.

Top
 Post subject: Re: Numpy and Scipy
PostPosted: Sat Apr 01, 2017 4:10 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
Thanks Tin, but also with your tutorial on GL I didn't succeed, sorry.

_________________
"Where am I ?"


Top
 Post subject: Re: Numpy and Scipy
PostPosted: Sat Apr 01, 2017 4:13 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
Just a question: are so "peculiar" to each system the added packages or can you post them here so that I can move where appropriate?
I have Windows 10 as you have, same gimp python.

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group