Compile python extensions under windows/cygwin

brendan.johnston at gmail.com brendan.johnston at gmail.com
Mon May 25 00:28:15 EDT 2009


On May 25, 9:42 am, David Lyon <david.l... at preisshare.net> wrote:
> On Sun, 24 May 2009 15:34:42 -0700 (PDT), Joana <joanacfcam... at gmail.com>
> wrote:
>
> > I mantain Python on Windows, all installed packages are under c:
> > \Python25\Lib\site-packages. Now I have to build C libraries used by
> > python extensions and I am using cygwin, but I don't know how to
> > install the module in Windows directory.
>
> > Can anyone help me?
>
> I think it is a problem because as far as I know cygwin cannot
> see files outside of /cygwin.
>
> Where is python installed in cygwin?
>
> Can't you install the same packages into cygwin?
>
> and then do your building in there...?
>
> David

I think I don't understand this comment.

All the drives on my windows machine are visible using the scheme:

/cygdrive/<drivename>/<path>/<to>/<file>

For example:

bash-3.2$ ls -l /cygdrive/c/windows/system32/drivers/etc/hosts
-rwx------+ 1 johnbre mkgroup-l-d 820 Nov  8  2008 /cygdrive/c/windows/
system32/drivers/etc/hosts
bash-3.2$

and you can mount things in cygwin as you choose:

http://www.cygwin.com/cygwin-ug-net/using.html#mount-table

The answer to the problem of compiling python packages was:

 * Download Visual C++ 2008 Express for free from Microsoft.
 * Find it was incompatible with compiling packages for my Python 2.5
(Visual Studio 2003).
 * Move to Python 2.6.
 * Problem solved, things compiled and worked





More information about the Python-list mailing list