---
title: "如何在编译boost python的时候指定所用python的版本"
author: "yoshiyan"
date: "2012-05-30T16:45:40Z"
tags: []
categories: ["编程语言"]
slug: "boost-python-python"
draft: false
lastmod: "2012-05-30T16:45:40Z"
id: 1545061
url: "https://gexp.iteye.com/blog/1545061"
---

修改user-config.jam文件

以boost 1.49为例，此文件的路径如下：
H:\boost_1_49_0\boost_1_49_0\tools\build\v2\

找到如下的部分，并根据需要进行修改。

# ---------------------
# Python configuration.
# ---------------------

# Configure specific Python version.
 using python : 2.7 : C:/Python27 : C:/Python27/include : C:/Python27/libs ;