Re: Building Pytroll in Windows

236 views
Skip to first unread message

Rutger

unread,
Nov 20, 2012, 3:17:17 AM11/20/12
to pyt...@googlegroups.com
Hey,

I have no experience with mpip in particular but your error message seems the result of the setup not being able to find a compiler, there is probably some c-code in the project which needs to be compiled at setup. Do you have a compiler installed?

The vccarsall is from MS Visual Studio (sort of the default compiler), if you have it installed you probably need to set your edit your PATH variable so the file can be found. If you dont have any compiler yet have a look at MinGW, a different compiler which should work fine, but might need an extra argument like "--compiler=mingw32" passed to the setup.py.

Hope it helps a little.

Regards,
Rutger



On Monday, November 19, 2012 3:18:24 PM UTC+1, Peter Miu wrote:
Hi,

I'm new to Pytroll and I'm trying to build it in the Windows 7 environment.

I had no problems with installing Python and mpop but mpip fails installation (see attached).

Has anyone in this group experienced this problem and found a fix for it.

Regards,

Peter Miu



Lars Orum Rasmussen

unread,
Nov 20, 2012, 3:57:28 AM11/20/12
to pyt...@googlegroups.com
Hi Peter,

I can confirm that there is C code in the MIPP package. If you still have problems compiling, after following Rutgers suggestions, let me know, and I will try to get access to a Windows-7 machine and see what I can find out.

Regards, Lars   


2012/11/19 Peter Miu <pete...@googlemail.com>

Rutger

unread,
Nov 20, 2012, 4:12:16 AM11/20/12
to pyt...@googlegroups.com
Hey,

I tried compiling mpip myself and ran in to the following error message from MinGW:
Cannot export initmipp/xrit/_convert: symbol not defined
collect2.exe: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1


See the attached picture for the full output during the build. Having near zero experience with compiling code myself i have no clue what it could be, but lets see if Peter runs into as well. To (sort of) verify my setup i tried compiling the latest dev version of Pandas, which compiled fine.

Im on a 32bit Win XP machine btw.

Regards,
Rutger
mpip_mingw32.png

Peter Miu

unread,
Nov 20, 2012, 4:25:09 AM11/20/12
to pyt...@googlegroups.com
Hi Lars and Rutger,

Thanks for the suggestion and the support.

I think the problem is to do installing Python 64 bit on my Windows 7 machine not being compatible modules only supplied with precompiled binaries for the 32-bit Python distribution.
I'm installing Python 32 bit at the moment to test if this is the case.

If not, then I will try your suggestions.

I will keep you informed if I have success or not.

Regards,

Pete.

Rutger

unread,
Nov 20, 2012, 5:07:48 AM11/20/12
to pyt...@googlegroups.com
Hey,

The error i mentioned earlier has to do with the slashes (always a pleasure ;)), changing the setup.py from:

ext = Extension('mipp/xrit/_convert', ['mipp/xrit/convert/wrap_convert.c',
                                       'mipp/xrit/convert/10216.c'],
                extra_compile_args = ['-std=c99', '-O9'])


to

ext = Extension('mipp.xrit._convert', ['mipp/xrit/convert/wrap_convert.c',
                                       'mipp/xrit/convert/10216.c'],
                extra_compile_args = ['-std=c99', '-O9'])


This worked for me, it build and installed with no errors.


@Peter
I dont think mipp is shipped with precompiled binaries. I still might be worth testing it with Python 32bit since i dont know if MinGW supports 64bit as good as 32bit.

MinGW-w64 can be found at: http://mingw-w64.sourceforge.net/


Regards,
Rutger

Peter Miu

unread,
Nov 20, 2012, 6:40:24 AM11/20/12
to pyt...@googlegroups.com
Thanks Rutger.

Pete.

Martin Raspaud

unread,
Nov 20, 2012, 5:23:25 AM11/20/12
to pyt...@googlegroups.com
On 20/11/12 11:07, Rutger wrote:
> Hey,
>
> The error i mentioned earlier has to do with the slashes (always a pleasure
> ;)), changing the setup.py from:
>
> *ext = Extension('mipp/xrit/_convert', ['mipp/xrit/convert/wrap_convert.c',
> 'mipp/xrit/convert/10216.c'],
> extra_compile_args = ['-std=c99', '-O9'])*
>
> to
>
> *ext = Extension('mipp.xrit._convert', ['mipp/xrit/convert/wrap_convert.c',
> 'mipp/xrit/convert/10216.c'],
> extra_compile_args = ['-std=c99', '-O9'])*
>
> This worked for me, it build and installed with no errors.

Hi Rutger,

Nice catch!
It actually reminds me of a similar issue you raised a while ago, where
I had to change the setup.py in mpop due to a slash error in windows.

I had to switch then to os.path.join to be sure it would be os
independent...

Best regards,
Martin

martin_raspaud.vcf

Peter Miu

unread,
Nov 20, 2012, 11:19:38 AM11/20/12
to pyt...@googlegroups.com
Hi all,

Just to give you an update on my Windows build, I think its getting there but there are quite a few things you have the do to get it to work.
I've now installed mpop and mipp (I think).  I'm trying to run the "First Example: Loading Data" and I need to install the pyresample module.  The compile of this fails as its looking for a library called Blas (see attached screen shots).  Any idea what I need to download from this website as it seems unclear to me as its offers fortran files (do I have to install a Fortran compiler now??):

http://www.netlib.org/blas/

Note: I'm writing all the steps down for this installation and I will post it on this forum once I can prove the installation I have done works.


Regards,

Pete.


On Monday, 19 November 2012 15:18:24 UTC+1, Peter Miu wrote:
Blas.jpg
mpop.jpg

Rutger

unread,
Nov 21, 2012, 2:36:34 AM11/21/12
to pyt...@googlegroups.com
Hey Peter,

Pyresample relies on some other packages for specific functions like interpolation, it crashes on installing those. It looks like you didnt have the Scipy module installed and the setup cleverly automatically downloads and installs all needed modules. This often works well for simple packages but the more complicated ones might itself rely on other packages or libraries etc. Having similar experiences as you have right now, my approach is to manually install as much depencies as possible before running the setup. In the case of Pyresample, opening the setup.py will reveal these dependencies:
requirements = ['pyproj', 'numpy', 'scipy', 'configobj']

Windows builds for these packages can be found on this website: http://www.lfd.uci.edu/~gohlke/pythonlibs/

Make sure you download the installer for the Python version you have installed. Those installers should automatically pickup your installation. After installing these, try running the Pyresample setup again.

Regards,
Rutger

Petenaldo

unread,
Nov 21, 2012, 2:40:40 AM11/21/12
to pyt...@googlegroups.com
Thanks Rutger for the info, I will try it & report back.

Regards,

Pete.

Sent from my iPhone

Lars Orum Rasmussen

unread,
Nov 20, 2012, 4:36:49 AM11/20/12
to pyt...@googlegroups.com
Hi,

So, at least, it is compiling, but the linking fail. So Python development environment seems to be installed. But, just to be sure, is there library files in C:\Python27\libs ?

Regards, Lars


2012/11/20 Rutger <kas...@gmail.com>

Lars Orum Rasmussen

unread,
Nov 20, 2012, 7:38:34 AM11/20/12
to pyt...@googlegroups.com
Hi Rutger, thanks for the fix ... I will update githup with Martin's os.path.join.

Regards, Lars


2012/11/20 Rutger <kas...@gmail.com>
Hey,

Peter Miu

unread,
Nov 26, 2012, 5:58:07 PM11/26/12
to pyt...@googlegroups.com
Hi Rutger,

I think I'm almost there, got most things to install on windows 7 but there seems to be problem with the scipy module as it does not create a version of qhull (see attached - pyresample does not work without this 'dll' module).  I'm using Python27 and have also tried it on Python26 without success.

Can you check if you have this file created on your system.  I've search the forum to see how to resolve this also without success. 
Sorry for the delay in replying, I've been trying to build the system also on Mac OS and this also failed as I had a lot of problems with my environment so I gave up after 4 hours.

Any help or ideas you may have to resolve this would be appreciated.


Regards,

Pete.


On Monday, 19 November 2012 15:18:24 UTC+1, Peter Miu wrote:
SCIPY_err.jpg

Rutger

unread,
Nov 27, 2012, 2:45:52 AM11/27/12
to pyt...@googlegroups.com
Hey Peter,

I do have the "qhull.pyd" file in my installation directory, the rest of the folder looks identical as well. It doesnt ring a bell to me. Do you have the file? Or is the screenshot from someone else? Most DLL errors i've seen, assuming the installation went alright, come down to the PATH environment variable. If you have the .pyd file you can use Dependency Walker on it to check its dependencies.

My machine runs Python 2.7 on 32bit and i also use 64bit machines, both XP. I never have had any problems with Pyresample though.


Regards,
Rutger

Peter Miu

unread,
Nov 28, 2012, 8:37:11 AM11/28/12
to pyt...@googlegroups.com
Hi Rutger,

Thanks for the reply and help.  Sorry for the delay in providing you with an update as I am current attending the Pytroll workshop in Norrkoping.

I have now come to the conclusion there are too many obstacles for a beginner like me to install a working version Pytroll on Mac OS and Windows.

The simplest way to get a working version is:

- Install VirtualBox (free from https://www.virtualbox.org/)
- Install a VirtualBox Image of a OS with Pytroll fully installed
 (cloned for someone who has successfully done this).

It is very simply to do this and I have mentioned this to Martin.

Thanks for your help again.

Sincere Regards,
Reply all
Reply to author
Forward
0 new messages