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)
- `stdgpu` target fails the CMake configure step with CUDA 12.4 due to changes in Thrust version header
- GUI/WebRTC/`ext_civetweb` error on latest MSVC (2022): `invalid numeric argument '/Wextra'`
- Is it possible to access additional vertex properties from ply file?
- v0.18.0 Build failure: fatal errors: multiple defined symbols in 'zlib.dll' & Cannot open include file: 'unzip.h' HOT 1
- How to use Open3D in QT Widget
- Cannot import Open3D0.18 on Windows 11 64 HOT 2
- 'double free or corruption (!prev)' when using .extract_voxel_grid() HOT 1
- Multiple errors related to **tgeometry_kernel** when compiling with CUDA 12.4 HOT 1
- Connected Component Clustering with Octree
- Does open3d have a confirm dialog in gui ?
- PointCloud.points has no elements and read only HOT 3
- open3d initialization failed Prompt:UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 4-5: invalid continuation byte HOT 1
- Segmentation fault when importing first PyTorch 2.2.2 and then Open3D 0.18.0 HOT 1
- Cannot compile on Windows 10 with MinGW-w64 HOT 2
- Why is the human point cloud generated by my icp algorithm noisy
- How to get a colored ointcloud from RGBD images?
- open3d.visualization.Visualizer.get_render_option() return NoneType Object
- Is the box.GetOrientedBoundingBoxLines() deleted in recent version?
- Open3D-0.18.0\cpp\open3d\ml\impl\continuous_conv\ContinuousConvTranspose.h(73,45): error C2975: “Rows_”:“Eigen::Array”的模板参数无效,应为编译时常量表达式
- Global & Local Registration result not good
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.