DLL load failed: The specified module could not be found


#1

I’ve installed Couchbase Server on a Windows 7 64bit laptop along with the Python libs, etc in line with the setup guide, however I am getting the following error when importing Couchbase in my Python test script:

DLL load failed: The specified module could not be found.

Can anyone please point me in the direction of where it has gone wrong?

The trace log shows it is pulling in various Couchbase files, so I was thinking this might be a problem with the Python lib interacting with libcouchbase?

In case it was a problem with the installer, I also downloaded Visual Studio Express so I could try building libcouchbase from source using NMAKE, but still no joy.

Couchbase Server and the web management interface works perfectly, it’s just the Python integration that fails.

My environment:
Python 3.3
Couchbase Server 2.2
Python SDK 1.1 64bit

Thanks,


#2

Hi there,

Can you please post your python test script and full error for me to take a look at?

I would recommend pasting them into: http://pastebin.com documents, but make sure you set the ‘Paste Exposure’ setting to Unlisted. Then click on the ‘Raw’ link, and paste the URL from that here.

Or alternatively, make a Gist on Github and send me the link.

Thanks,

Robin.


#3

Thanks Robin,

http://pastebin.com/udcujeZs

It’s a very simple script as you can see. os and sys are being imported for other purposes, testing manipulating the sys.path to see if that fixed anything, but it didn’t, so the associated code was removed.

Thanks
Karl


#4

Are you using the EXE from PyPy?

You should have a ‘_libcouchbase.pyd’ and a ‘libcouchbase.dll’ in the same directory where the packages have been installed.

For what it’s worth, here’s the build log:

http://sdkbuilds.couchbase.com/job/pycbc-win/178/label=python_win2008_x64,pyarch=x64,pyversion=33/console


#5

Hi Mark,

I’m using Python 3.3.2 downloaded from http://www.python.org/ftp/

This installed to C:\Python33\

libcouchbase.dll and _libcouchbase.pyd are located in C:\Python33\Lib\site-packages\couchbase

Thanks,
Karl


#6

I’ll try to reproduce it. You MAY need the CRT - though that’d be odd considering that one would hope it’s bundled within the Python binary.

Now that I look at it too though, it would seem that Python 3.3 is supposed to be building against VC10, whereas in these logs, it shows using the VC9 libcouchbase version. I’m going to investigate some more.


#7

Thanks Mark.

Is there anything you would like me to do to eliminate it being a problem with my machine?

I’m happy to uninstall everything couchbase & python related if you have specific exe/msi installers that you’d prefer me to test.


#8

I think I have an idea what the problem is. The only thing is I’m not sure what the correct solution is. There doesn’t seem to be any definitive info out there saying what VS version Python wants for 3.3 x64

What does your ‘sys.version’ say?


#9

sys.version output:

3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)]

Hope that helps!


#10

A result on stackoverflow tells me that MSC v.1600 = Visual C++ 2010.

I’m guessing you know this much already though :slight_smile:


#11

You’re right in luck! the breakage in the build happens just for your version: http://sdkbuilds.couchbase.com/job/pycbc-win/label=python_win2008_x64,pyarch=x64,pyversion=33/188/console – I’m still trying to figure out what the root issue is.

Once I figure this out, I’ll generate a binary for 1.1.0 on Py3.3/x64. You can ping me on #libcouchbase in IRC (on freenode) if you want all the gory details…

The build script is here though: https://gist.github.com/mnunberg/5754213


#12

In the meantime, you should be good to go on the 3.3 x86 version. This seems to affect only 3.3 and only on x64


#13

Thanks Mark, I really appreciate your attention on this. I’m up and running now on 32bit.

I spent best part of a day trying to get to the bottom of it myself. That’s what happens when a web app developer tries to understand builds!

Thanks again,
Karl


#14

Sorry for the trouble. Anyway I fixed the build problem. Now the only thing left is to figure out how to make the build machine generate the one for 1.1.0


#15

Hey no problem! You can’t be expected to account for every system configuration. I’m just glad we (you) could sort a solution so quickly.

If you need anything testing, just give me a shout. I’m subscribed to updates on this thread, or you can email me directly.

Thanks,
Karl