ImportError: No module named win32con

2,028 views
Skip to first unread message

oscar.reyes

unread,
Oct 22, 2008, 7:24:30 PM10/22/08
to Enso Developers
I'm trying to compile enso on windows.

After read and learn a lot of stuff from C++ , scons, and python
( which I've never worked with before )

I've managed to compile and find most of the dlls used by enso.



These are the steps I have done so far

Install VC++2008 express edition
Install Python2.6
Install scon on python 2.6

I've changed everything as posted by Blair McBride here http://paste2.org/p/69732

Everything but the lines concerned with:

#SHLIBSUFFIX = ".pyd",

Don't ask me why, I don't know my self.

In the error
ImportError: No module named _cairo

I commented out the line that attempt to load it. in enso\platform
\win32\cairo\__init__.py


Everything looks good now my new problem is this.

File "C:\oreyes\apps\enso\enso-read-only\enso\platform
\win32\selection\ClipboardArchive.py", line 44, in <module>
import win32con
ImportError: No module named win32con
INFO [Wed Oct 22 18:01:19 2008 src\platform\win32\InputManager
\AsyncEventThread.cxx L249]: async event thread: quit signal received.
INFO [Wed Oct 22 18:01:19 2008 src\platform\win32\InputManager
\AsyncEventThread.cxx L303]: Closed invisible window.

The same happen in the built provided by Blackdeamon here.
http://blackdaemon.no-ip.org/bin/enso/enso-win32-experimental-081006.zip

I get the same "win32con" error


What's that win32con error? I guess is a dll, but where can I get it?
I look at my computer and it looks like scons uses it

Thanks for the help.

blackdaemon

unread,
Oct 22, 2008, 7:31:32 PM10/22/08
to Enso Developers
I suppose you don't have pywin32 installed (Python winapi support).
You can get it from there:
http://sourceforge.net/project/showfiles.php?group_id=78018&package_id=79063


On Oct 23, 1:24 am, "oscar.reyes" <oscar.reyes.delac...@gmail.com>
wrote:
> I'm trying to compile enso on windows.
>
> After read and learn a lot of stuff from C++ , scons, and python
> ( which I've never worked with before )
>
> I've managed to compile and find most of the dlls used by enso.
>
> These are the steps I have done so far
>
> Install VC++2008 express edition
> Install Python2.6
> Install scon on python 2.6
>
> I've changed everything as posted by Blair McBride herehttp://paste2.org/p/69732
>
> Everything but the lines concerned with:
>
> #SHLIBSUFFIX = ".pyd",
>
> Don't ask me why, I don't know my self.
>
> In the error
> ImportError: No module named _cairo
>
> I commented out the line that attempt to load it. in enso\platform
> \win32\cairo\__init__.py
>
> Everything looks good now my new problem is this.
>
> File "C:\oreyes\apps\enso\enso-read-only\enso\platform
> \win32\selection\ClipboardArchive.py", line 44, in <module>
> import win32con
> ImportError: No module named win32con
> INFO [Wed Oct 22 18:01:19 2008 src\platform\win32\InputManager
> \AsyncEventThread.cxx L249]: async event thread: quit signal received.
> INFO [Wed Oct 22 18:01:19 2008 src\platform\win32\InputManager
> \AsyncEventThread.cxx L303]: Closed invisible window.
>
> The same happen in the built provided by Blackdeamon here.http://blackdaemon.no-ip.org/bin/enso/enso-win32-experimental-081006.zip

blackdaemon

unread,
Oct 22, 2008, 7:36:42 PM10/22/08
to Enso Developers
Commenting out the loading of _cairo library is not a good idea. It
will just not work
without it. I think you will face another buch of errors pertaining to
missing _cairo
as soon as you solve the win32con problem...
Did you change the paths in all .cxx and .h files?

On Oct 23, 1:31 am, blackdaemon <pavelvi...@gmail.com> wrote:
> I suppose you don't have pywin32 installed (Python winapi support).
> You can get it from there:http://sourceforge.net/project/showfiles.php?group_id=78018&package_i...

oscar.reyes

unread,
Oct 22, 2008, 7:45:27 PM10/22/08
to Enso Developers
Change path in cxx and h? No, not at all, should I?

About cairo... mmhh someone said I should have it installed also, is
not built with the source code? Or is it similar to this win32con that
should be installed by outside, if so, do you know where can I fetch
it?

I guess any decent python developer has all those libs already
installed, but this is my very first approach to python and c++ :S :S

I'll give it a try

Thanks.

oscar.reyes

unread,
Oct 22, 2008, 8:16:13 PM10/22/08
to Enso Developers
Ok.. you were right. Now how do I get over cairo module?
:)
File "C:\oreyes\apps\enso\enso-read-only\enso\cairo.py", line 3, in
<module>
__cairoImpl = enso.providers.getInterface( "cairo" )
File "C:\oreyes\apps\enso\enso-read-only\enso\providers.py", line
137, in getInterface
interface = provider.provideInterface( name )
File "C:\oreyes\apps\enso\enso-read-only\enso\platform
\win32\__init__.py", line 61, in provideInterface
import enso.platform.win32.cairo
File "C:\oreyes\apps\enso\enso-read-only\enso\platform\win32\cairo
\__init__.py", line 1, in <module>
from _cairo import *
ImportError: No module named _cairo


On Oct 22, 6:36 pm, blackdaemon <pavelvi...@gmail.com> wrote:

blackdaemon

unread,
Oct 22, 2008, 9:05:50 PM10/22/08
to Enso Developers
Hi, why bother trying to find out something that somebody already did
before you? Please take a look at my previous message here:

http://groups.google.com/group/enso-developers/msg/5a84ce56a89d97d1?hl=en

that means that all you need to change in community branch to make it
work is
visible in following patch:

http://blackdaemon.no-ip.org/git/?p=enso/enso-open-source.git;a=commitdiff;h=33b781283f1c865c8d726e6a67e22e1ad9b2b3f7

Notice that you will have to change all .cxx and .h files, because in
te community
version there enso_win32 directory has been moved to enso/platform/
win32 directory
and C++ sources needs to reflect that. This is also reason why you get
the _cairo import
error, the code is searching for its libraries in the wrong
directory...

...or, just use my patch and you are set...

On Oct 23, 2:16 am, "oscar.reyes" <oscar.reyes.delac...@gmail.com>
wrote:

oscar.reyes

unread,
Oct 22, 2008, 10:22:46 PM10/22/08
to Enso Developers
mmh and what's the git url for that?

I've downloaded git exe and try to fetch the code but I don't know
where.

I've tried to download a snapshot from your site but the downloaded
file is currupt..


On Oct 22, 8:05 pm, blackdaemon <pavelvi...@gmail.com> wrote:
> Hi, why bother trying to find out something that somebody already did
> before you? Please take a look at my previous message here:
>
> http://groups.google.com/group/enso-developers/msg/5a84ce56a89d97d1?h...
>
> that means that all you need to change in community branch to make it
> work is
> visible in following patch:
>
> http://blackdaemon.no-ip.org/git/?p=enso/enso-open-source.git;a=commi...

blackdaemon

unread,
Oct 30, 2008, 1:53:41 PM10/30/08
to Enso Developers
Yes, you were right, sorry for that. The correct URL for getting it
via Git is:

git clone http://blackdaemon.no-ip.org/project/enso/enso-open-source
enso-open-source

I also wrote small Enso win32 building guide here:

http://blackdaemon.no-ip.org/wiki/projects:enso:building_win32

Regarding the snapshot, should not be corrupt, I just tried. But
anyway, there is a zipped copy:

http://blackdaemon.no-ip.org/bin/enso/enso-open-source-2cca4e1dd082715ff4cbf2944f67c3105216973a.zip


On Oct 23, 3:22 am, "oscar.reyes" <oscar.reyes.delac...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages