---
title: 安装pybind11
description: "1. 使用PuTTY工具，以root用户登录服务器。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengpsi_02_0011.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengpsi_02_0011.html
indexId: 80e1701955b2c3e5063beef96eb38774b05fc42cbe2f91b592a072dcef73434d65
---
# 安装pybind11

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令解压pybind11安装包。

```
cd
/path/to/PYBIND11
tar -xvf pybind11-2.6.2.tar.gz
```


3. 执行以下命令进入解压后的目录。

```
cd pybind11-2.6.2
```


4. 执行以下命令编译。

```
mkdir
/path/to/PYBIND11
/build
cmake -H. -B
/path/to/PYBIND11
/build -DCMAKE_INSTALL_PREFIX=
/path/to/PYBIND11
/install
```


5. 执行以下命令安装。

```
cd
/path/to/PYBIND11
/build
make -j
make install
```
