realpython / realpython/materials

Specifying python.h and pybind11 path in windows

未关闭
#169 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Jupyter Notebook
星标
5.2k
派生
5.3k
平均合并
4 天 10 小时
30 天内合并 PR
10

描述

Hello everyone, and thanks for this great material.
I am trying to use cython to import a C++ library in Python.
I followed the instructions in Python Bindings: Calling C or C++ From Python, but I have a problem.
Everything is fine till I run "invoke build-cython"
The g++ cannot find the path for python and pybind11 directory. The error is:
Issue1

I guess the line ""-I /usr/include/python3.7 -I . "" in tasks.py file (line 132) does not work for me. Am I right? (is it because I'm using Windows?)
Can anyone please help me to solve this issue?

Thank you in advance.
Vahid.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

invoke build-cython 入口点和第 132 行附近的 python-bindings/overview_article/tasks.py 开始,然后将硬编码的 include 路径与 issue 中显示的 Windows 编译器错误进行比较。完成的标准是:示例的 Cython 构建能够在 Windows 上完成,并且 Python 和 pybind11 路径已解析。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp, python
领域
build-system, developer-experience
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。