1

I am trying to install Boost Python, however http://www.boost.org/doc/libs/1_55_0/libs/python/doc/tutorial/doc/html/python/hello.html is too compressed for me. I am switchig to Windows from Linux, setting up all the technical stuff drives me crazy :)

So when I follow the instructions http://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html#prepare-to-use-a-boost-library-binary and try to execute bootstrap.bat it complains about a missing VCVARS32.BAT and it does not recognice the "cl" command - I have however both MS VS Express 2012 and 2013 installed, both boost versions (32, 64) are installed in C:/local/, documentations says that both should work. So why does it not find the compiler?

Update: So http://msdn.microsoft.com/en-us/library/9s7c9wdw%28v=vs.110%29.aspx says that you cannot use the compiler from the command line... how do I build my bjam then? This must be something totally trivial and stupid... :/

Update: Okay, one step further. vcvars32.bat actually sets all environment variables to go, so i can invoke the command line compiler now! Also there are actually prebuild binaries of bjam from the official boost site http://sourceforge.net/projects/boost/files/, I got it and copied it to by boost_xxx/tools folder and added the site to the path, so i can invoke bjam from command line as well. Next I put a user-config.jam in my home folder, it only says:

#  MSVC configuration
using msvc : 11.0 ;

#  Python configuration
using python : : C:/Users/me/Anaconda ;

In the Jamroot file provided with C:\local\boost_1_55_0\libs\python\example\tutorial, I only edited

use-project boost
: C:/local/boost_1_55_0 ;

then I call bjam from the very same directory which gives my some cryptic output

C:\local\boost_1_55_0\libs\python\example\tutorial>bjam
warning: mismatched versions of Boost.Build engine and core
warning: Boost.Build engine (bjam) is 03.1.18
warning: Boost.Build core (at C:/local/boost_1_55_0/tools/build/v2) is 2011.12-s
vn
link.jam: No such file or directory
C:/local/boost_1_55_0/tools/build/v2/util\path.jam:458: in path.makedirs
rule MAKEDIR unknown in module path.
C:/local/boost_1_55_0/tools/build/v2/build\configure.jam:233: in configure.set-l
og-file
C:/local/boost_1_55_0/tools/build/v2\build-system.jam:695: in load
C:\local\boost_1_55_0\libs\python\example\..\..\..\tools\build\v2/kernel\modules
.jam:289: in import
C:\local\boost_1_55_0\libs\python\example\..\..\..\tools\build\v2\kernel\bootstr
ap.jam:139: in boost-build
C:\local\boost_1_55_0\libs\python\example\boost-build.jam:7: in module scope

C:\local\boost_1_55_0\libs\python\example\tutorial>

Now, can you give me any hints as to what went wrong and where to go from here? I really want a stable, robust working copy of boost.python - it doesn't make sense to me if I need to hack something together. I thought it was quite standard/reliable, isn't there something like "boost.python for guys who did not study computer science"? Can I ignore the warnings?

Jack
  • 195
  • 2
  • 10

1 Answers1

3

Perhaps you can use the binary from http://www.lfd.uci.edu/~gohlke/pythonlibs/#boost.python

Regarding your compiler problems: there is a bunch of questions on this on SO already. Basically, the compiler you need depends on your version of python. You will probably need to install some Windows SDK and setup some stuff manually. It has always been a pain in the ass for me and in the end you might be better of with using some python distribution like Canopy (there are a few others out there).

Se Norm
  • 1,715
  • 5
  • 23
  • 40
  • Thanks, I used the official binary installer from the boost guys, the problem with those prepacked distributions is that at some point you need something that they don't include and you are screwed :( I mean it can't be so hard getting a command line compiler to work on windows can it ^^. I want to learn exactly that pain-in-the-ass stuff once ;) There must be a comprehensible tutorial or so on that, I just couldn't find it yet... I mean its incredible, that there is no step by step intro for that on msdn! – Jack Mar 01 '14 at 17:07
  • @user2900072: The binary installer can't give you the needed compiler because it's not theirs to give away -- you must obtain it yourself. Each version of Python was built with a specific version of an MS compiler. For version 2.x you used to be able to get Visual C++ 2008 Express Edition for free -- however MS doesn't distribute it any more, so unless you already have it, you have a problem. It's possible to use non-MS compilers, like Cygwin's gcc. This works because they don't use the MS C/C++ runtime, so conflicts that would arise from mixing two different versions of it won't occur. – martineau Mar 07 '14 at 05:00
  • @user2900072: There might be a MS SDK you can still get, see question [Visual C++ 2008 Express Download Link Dead?](http://stackoverflow.com/questions/15318560/visual-c-2008-express-download-link-dead). – martineau Mar 07 '14 at 05:07