Getting started¶
Python¶
Open3D Python packages are distributed via PyPI.
Supported Python versions:
|
|
|
|
Supported operating systems:
Ubuntu 18.04+
macOS 10.15+
Windows 10 (64-bit)
If you have other Python versions or operating systems, please refer to Build from source and compile Open3D from source.
Pip (PyPI)¶
pip install open3d
Note
Please upgrade your pip
to a version >=20.3 to install Open3D in Linux,
e.g. with
pip install -U pip>=20.3
Note
In general, we recommend using a
virtual environment
or conda environment.
Otherwise, depending on the configurations, pip3
may be needed for
Python 3, or the --user
option may need to be used to avoid permission
issues. For example:
pip3 install open3d
# or
pip install --user open3d
# or
python3 -m pip install --user open3d
Development version (pip)¶
To test the latest features in Open3D, download and install the development
version (HEAD
of master
branch):
Linux |
||||
---|---|---|---|---|
MacOS |
||||
Windows |
Please use these links from the latest version of this page only. For example, to install the latest development version on Linux for Python 3.9:
pip install --user --pre \
https://storage.googleapis.com/open3d-releases-master/python-wheels/open3d-0.15.1-cp39-cp39-linux_x86_64.whl
Note
The development wheels for Linux are named according to PEP600. Please
use pip
version >=20.3 to install them. The wheels are not yet fully
PEP600 compliant.
Try it¶
# Verify installation
python -c "import open3d as o3d; print(o3d.__version__)"
# Python API
python -c "import open3d as o3d; \
mesh = o3d.geometry.TriangleMesh.create_sphere(); \
mesh.compute_vertex_normals(); \
o3d.visualization.draw(mesh, raw_mode=True)"
# Open3D CLI
open3d example visualization/draw
If everything works, congratulations, now Open3D has been successfully installed!
Troubleshooting:¶
If you get an error when importing Open3D, enable detailed Python warnings to help troubleshoot the issue:
python -W default -c "import open3d as o3d"
Running Open3D tutorials¶
A complete set of Python tutorials and testing data will also be copied to
demonstrate the usage of Open3D Python interface. See examples/python
for
all Python examples.
Note
Open3D’s Python tutorial utilizes some external packages: numpy
,
matplotlib
, opencv-python
. OpenCV is only used for reconstruction
system. Please read util/install-deps-python.sh
for installing these
packages.
C++¶
To get started with using Open3D in your C++ applications, you can download a
binary package archive from Github releases (since v0.15). These binary
package archives contain the Open3D shared library built with all supported
features and are available for the main supported platforms. Also, the latest
development version (HEAD
of master
branch) binary package archives are
provided here 1:
- Linux (Ubuntu 18.04+ or glibc 2.27+ 2)
- MacOSX v10.15+
- Windows 10+
- 1
Please use these links from the latest version of this page only.
- 2
To check the glibc version on your system, run
ldd --version
.
Note
In Linux, do not link code with different CXX11 ABIs, since this will most likely cause linker errors or crashes. Most system libraries in recent Linux versions (e.g. if the OS came with GCC versions 5+) use the CXX11 ABI, while PyTorch and Tensorflow libraries typically use the pre CXX11 ABI.
If you need only a subset of features, or a custom build configuration, please refer to Build from source and compile Open3D from source.
Try it¶
Extract the archive and move the contents to a local folder (such as
$HOME/Documents/Open3D_install
):
Linux / MacOSX: Windows:
Open3D_install Open3D_install
├── include ├── bin
│ └── open3d │ └── Open3D.dll
│ ├── core ├── CMake
│ ├── ... │ ├── Open3DConfig.cmake
│ ├── Open3DConfig.h │ ├── ...
│ ├── Open3D.h ├── include
│ ├── ... │ └── open3d
└── lib │ ├── core
├── cmake │ ├── ...
│ └── Open3D │ ├── Open3DConfig.h
│ ├── ... │ ├── Open3D.h
├── libOpen3D.so │ ├── ...
├── open3d_tf_ops.so └── lib
└── open3d_torch_ops.so └── Open3D.lib
Some files may be absent in the case of unsupported functionality. To use Open3D
with your programs through cmake, add -D
Open3D_ROOT=$HOME/Documents/Open3D_install
to your CMake configure command
line. See the following example CMake projects for reference:
The C++ code examples in the examples/cpp
folder of the repository illustrate
a lot of the functionality available in Open3D and are a good place to start
using Open3D in your projects.