Boost logo

Boost Users :

Subject: [Boost-users] Setting up Boost.Python under XP, and .pyd imports
From: Mohan Ganesalingam (mg262_at_[hidden])
Date: 2009-11-13 06:24:15


Hi,

I'm having some trouble trying to set up boost.python on Windows XP with
MSVC 9 and Python 2.6; any help would be much appreciated. I started by
following the instructions in

http://www.boost.org/doc/libs/1_40_0/libs/python/doc/tutorial/doc/html/python/hello.html

I started by adding the directory with the bjam executable to the oath, and
running it from the tutorial directory. I found that it ignores the
user-config.jam in %HOMEDRIVE%%HOMEPATH%, and uses the one in

   C:\Program Files\_Applications\Microsoft Visual Studio
9.0\boost_1_39\tools\build\v2\user-config.jam

instead; apart from that, everything works correctly and I get
extending.pyd and a load of other files in

   C:\Program Files\_Applications\Microsoft Visual Studio
9.0\boost_1_39\libs\python\example\quickstart\bin\msvc-9.0\debug\threading-multi

I know it must be possible to import extending.pyd from that selfsame
directory, because the testing script run by bjam manages it. But the only
way I could load it myself was to copy it into some directory that is in
the path. Is there any way to simply have the .pyd loaded from the local
directory, i.e. from the directory that the main .py script is executed in?
(I guess I could temporarily modify sys.path inside the script... but that
seems rather gawky.)

Also, while trying to solve this problem, I found a number of references
instructing me to put boost_python.dll in the main Python directory. I
couldn't find this file (after having run bjam), only
"boost_python-vc90-mt-gd-1_39.dll". Is that the right one to use?

Thank you in advance,
Mohan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net