Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
f600c1d8
Commit
f600c1d8
authored
Jun 03, 2016
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated FAQ section on Python detection
parent
ca8dc08a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
docs/faq.rst
+7
-14
No files found.
docs/faq.rst
View file @
f600c1d8
...
@@ -24,24 +24,17 @@ The Python interpreter immediately crashes when importing my module
...
@@ -24,24 +24,17 @@ The Python interpreter immediately crashes when importing my module
See item 2 of the first answer.
See item 2 of the first answer.
CMake doesn't detect the right Python version
, or it finds mismatched interpreter and library versions
CMake doesn't detect the right Python version
=============================================
=========================================================
=============================================
The Python detection logic of CMake is flawed and can sometimes fail to find
The CMake-based build system will try to automatically detect the installed
the desired Python version, or it chooses mismatched interpreter and library
version of Python and link against that. When this fails, or when there are
versions. A longer discussion is available on the pybind11 issue tracker
multiple versions of Python and it finds the wrong one, delete
[#f1]_, though this is ultimately not a pybind11 issue.
``CMakeCache.txt`` and then invoke CMake as follows:
To force the build system to choose a particular version, delete CMakeCache.txt
and then invoke CMake as follows:
.. code-block:: bash
.. code-block:: bash
cmake -DPYTHON_EXECUTABLE:FILEPATH=<...> \
cmake -DPYTHON_EXECUTABLE:FILEPATH=<path-to-python-executable> .
-DPYTHON_LIBRARY:FILEPATH=<...> \
-DPYTHON_INCLUDE_DIR:PATH=<...> .
.. [#f1] http://github.com/pybind/pybind11/issues/99
Limitations involving reference arguments
Limitations involving reference arguments
=========================================
=========================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment