Page MenuHome

Python/Windows issue: "import uuid" results in an error popup
Closed, ResolvedPublic



- Open Blender on a computer with any Windows Operating system
- Open the python console
- Enter: import uuid

I get a popup window stating:

R6034 An application has made an attempt to load the C runtime library incorrectly...

This popup occurs only on the very first attempt to load it.
Subsequent "import uuid" statements do not raise the error again.



Event Timeline

Additional info: This error only occurs on Windows systems.
Linux and OSX do not suffer from this problem!

This is very strange, it seems to be an MSVC dependancy issue.

Info I dug up on this issue:

Oddly enough it works in msvc2008 and msvc2010, on my windows XP system but 2.57b release and MinGW builds give the error.

closing. (if for some reason the fix isn't working reply and I'll re-open)

I just updated to revision 37604. Unfortunately i still get the exact same problem when i open the python console and then:

import uuid

I am on windows 7 and i used scons for building:

python scons/

Make sure you don't have any runtime dlls in BF_INSTALLDIR, these will interfere with the fix.

I am building Blender with Visual c++ 2008 Express edition
and 32 bit python and using the following command:

python scons/

Here is the list of libraries i have in the installation directory after
the build completes:


The fix does still not work for me after completely rebuilding Blender:

- i deleted the entire installation directory
- i called: "python scons/ clean"
- i called: "python scons/"

After i open Blender, i go to the python console and:

import uuid

still gives me the error as initially reported.

I also tried to build for 64 bit. But i was not able to create a 64-bit Blender
based on my current setup. I also hesiotate to follow the "hack" described
on the Blender wiki, which is not even "officially supported by blebnder developers"

Maybe someone with a working 32-bit version can verify that the issue is not solved
for 32-bit builds.

The module in Python uses ctypes to get platform specific uuid creation routines (for performance benefits). So I think this is probably related to previous ctypes problems on Windows.

A workaround is to remove all the ctypes stuff from Python's to avoid triggering the problem.

python bug -> (from terrachild in irc)

I think most simple solution is that we apply this work around

Current windows x64 msvc 2013 build does not suffer from this problem.
Can someone reconfirm this ?

It still occurs in windows XP/32bits msvc 2008.

Campbell Barton (campbellbarton) closed this task as Resolved.EditedMay 5 2014, 10:22 PM

Closing, with Python3.4x and MSVC2013 this is now resolved.

It still occurs in windows XP/32bits msvc 2008.
SHA-1: 9f16428cb5f047bf46bc338746a0fa84add6e720

We wont be using MSVC2008 for the official release.

Understood it; then I change the wording.
An error still occurs in for official release.