-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pybind issue #66
Comments
I tried Pybind Cmake example and was able to get |
Still cannot figure it out how to solve this. In addition to the file extension problem, there is a python version issue when I am using anaconda. Anaconda sets custom python environment version (e.g. version 1) if I type As a result, compiled Python package is not importable from terminal. To make it work, I have to find out which python version is used for compilation, and set conda environment to that version to execute Open3D python script. The solution would be make CMake to force current python environment not to try to use system path. |
There is a paragraph in the documents I wrote. Python binding cmake -DPYTHON_EXECUTABLE:FILEPATH= ../src |
This command worked for me. I am using anaconda3 for Python 3.x, system default is Python 2.7
The point is I had to identify DPYTHON_EXECUTABLE and DPYTHON_LIBRARY for successful compilation. But I still got |
Addressed in #82 |
I just came across the exact same issue on my OSX with Anaconda 3.6. The above workaround fixed it. I enjoyed reading this quote: After reading through the numerous related bug reports involving homebrew, Python, and CMake, especially Homebrew/legacy-homebrew#25118 and http://www.itk.org/Bug/view.php?id=14809 , which you have contributed to, I developed a strong headache and stopped. I especially enjoyed this four year-old quote: "Basically, CMake clings to Frameworks like a drowning sailor on OSX" from Homebrew/legacy-homebrew#10393 (comment) . The issue persists in CMake 3.5.0-rc1. Anyways, it is definitely not a problem of Open3D, and probably not a problem of pybind11, but likely a problem of CMake. Pybind11 marked it as |
May worth adding
To our document though. |
This is the command I eventually used to make anaconda with customized env work:
|
I notice that cmake 3.6 tool-chain generates
py3d
instead ofpy3d.so
after compilation.This affects python scripts. They don't recognize
py3d
library.For example:
But if I change the name, it works
This issue comes with MacOSX Sierra, Cmake 3.6, Mac Native Python 2.7.
Windows + VisualStudio2015 seems to fine.
We may need to change CMakeList.txt file or get some information from Pybind to fix this issue.
The text was updated successfully, but these errors were encountered: