Comments (8)
I tried Pybind Cmake example and was able to get cmake_example.so
.
from open3d.
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 python
, and CMake exploits system path (e.g. version 2) to compile pybind11. The two versions may not match.
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.
from open3d.
There is a paragraph in the documents I wrote.
I copied some of the it from the pybind11 document:
Python binding
We use pybind11 to build the Python binding. It tries to automatically detect the installed version of Python and link against that. When this fails, or when there are multiple versions of Python and it finds the wrong one, delete CMakeCache.txt and then invoke CMake as follows:
cmake -DPYTHON_EXECUTABLE:FILEPATH= ../src
If you do not want Python binding, turn off the compilation options Open3D_BUILD_PYTHON_BINDING and Open3D_BUILD_PYTHON_BINDING_TESTS.
from open3d.
This command worked for me. I am using anaconda3 for Python 3.x, system default is Python 2.7
cmake -DPYTHON_EXECUTABLE:FILEPATH=/home/account_id/anaconda3/bin/
-DPYTHON_LIBRARY='/home/account_id/anaconda3/lib/libpython3.so' ../src
The point is I had to identify DPYTHON_EXECUTABLE and DPYTHON_LIBRARY for successful compilation.
But I still got py3d
after compilation, not desired py3d.so
. After I compile python binding I manually rename py3d
to py3d.so
. I think this is an issue for recent cmake versions (my cmake is 3.8.2). It was not happened to @qianyizh with cmake 3.2
from open3d.
Addressed in #82
from open3d.
I just came across the exact same issue on my OSX with Anaconda 3.6. The above workaround fixed it.
Also I read this interesting post:
pybind/pybind11#99
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 WONTFIX
. Likewise in Open3D.
from open3d.
May worth adding
cmake -DPYTHON_EXECUTABLE:FILEPATH=/home/account_id/anaconda3/bin/python
-DPYTHON_LIBRARY='/home/account_id/anaconda3/lib/libpython3.so' ../src
To our document though.
from open3d.
This is the command I eventually used to make anaconda with customized env work:
cmake -DPYTHON_LIBRARY=/Users/qianyizh/anaconda/envs/py36/lib/libpython3.6m.dylib
-DPYTHON_INCLUDE_DIR=/Users/qianyizh/anaconda/envs/py36/include/python3.6m
-DPYTHON_EXECUTABLE:FILEPATH=/Users/qianyizh/anaconda/envs/py36/bin/python3.6m
../src
from open3d.
Related Issues (20)
- C++ Types in Python Documentation HOT 1
- Open3D development wheels are unavailable HOT 2
- Animation camera trajectory json creation
- Open3D on WSL2 unable to visualize. Error: GLFW Error: Wayland: The platform does not support setting the window position, Failed to initialize GLEW., [DrawGeometries] Failed creating OpenGL window. HOT 1
- how to set VerbosityContextManager in c++ HOT 2
- multiview registration without odometry edge.
- Hidden point removal crashes silently HOT 5
- Silent Failure when assigning color to point cloud points, and/or creating coordinate frame triangle mesh. HOT 2
- generalizedICP get nan value.
- generalizedICP get nan value.
- issue in building open3d in jetson orin
- ICP registration crashes in visualization/draw
- Crash on construction of `o3d.visualization.VisualizerWithEditing` HOT 1
- Why is my computer reporting this error "Process finished with exit code -1073741819(0xC0000005)" HOT 4
- Bilateral Filters in PointClouds
- Not able to copy/paste from system clipboard into gui.TextEdit
- Unable to set background image of O3DVisualizer HOT 2
- How can I apply a transformation only once in open3D HOT 2
- Request to customize origin and size in octree.convert_from_point_cloud() HOT 1
- [Vuln for dependency] Please release new .whl files by using newest curl HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from open3d.