-
Notifications
You must be signed in to change notification settings - Fork 356
/
Copy pathinstall_open3d_python.sh
executable file
·60 lines (41 loc) · 1.42 KB
/
install_open3d_python.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env bash
# Author: Luigi Freda
#set -e
# ====================================================
# import the utils
. bash_utils.sh
# ====================================================
# NOTE: this is required under mac where I got unexpected segmentation fault errors
# on open3d dynamic library loading
#echo ROOT_DIR: $ROOT_DIR
cd $ROOT_DIR # from bash_utils.sh
STARTING_DIR=`pwd` # this should be the main folder directory of the repo
print_blue "Installing open3d-python from source"
#pip install --upgrade pip
pip uninstall -y open3d
cd thirdparty
if [ ! -d open3d ]; then
git clone https://github.com/isl-org/Open3D.git open3d
cd open3d
# This commit 0f06a149c4fb9406fd3e432a5cb0c024f38e2f0e didn't work. It corresponds to open3d 0.18.0 -> https://github.com/isl-org/Open3D/commits/v0.18.0
#git checkout 0f06a149c4fb9406fd3e432a5cb0c024f38e2f0e
# This commit worked!
git checkout c8856fc0d4ec89f8d53591db245fd29ad946f9cb
cd ..
fi
cd open3d
if [ ! -d build ]; then
mkdir build
fi
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release $EXTERNAL_OPTION
make -j$(sysctl -n hw.physicalcpu)
# Activate the virtualenv first
# Install pip package in the current python environment
make install-pip-package
# Create Python package in build/lib
make python-package
# Create pip wheel in build/lib
# This creates a .whl file that you can install manually.
make pip-package
sudo make install