You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/building.rst
+12-56Lines changed: 12 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,79 +20,35 @@ If you already have the code or you downloaded a release_, make sure to update t
20
20
Install dependencies
21
21
--------------------
22
22
23
-
OpenSfM depends on the following libraries that need to be installed before building it.
23
+
OpenSfM depends on multiple libraries (OpenCV_, `Ceres Solver`_, ...) and python packages that need to be installed before building it.
24
24
25
-
* OpenCV_
26
-
* `Ceres Solver`_
27
-
* OpenMP
25
+
The way to install these dependencies depends on your system. We recommend using a virtual environment manager such as anaconda or miniconda, not to mess up with your current setup. Anaconda will take care of installing both systems and python dependencies.
28
26
29
-
Python dependencies can be installed with::
27
+
Installing dependencies using Conda (recommended)
28
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30
29
31
-
pip install -r requirements.txt
32
-
33
-
Still, we recommand using a full virtual environment manager such as anaconda, not to mess up with your current setup. Anaconda will take care of installing both systems and python dependencies.
34
-
Anaconda dependencies installation has been tested under MacOS (Sequoia), Ubuntu 24.04 and Fedora 42, and can be installed with::
30
+
Creating a conda environment will take care of installing all dependencies. Make sure you have conda or miniconda installed. From the project root directory, run::
35
31
36
32
conda env create --file conda.yml --yes
37
33
38
-
Installing dependencies on Ubuntu
39
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40
-
41
-
See this `Dockerfile <https://github.com/mapillary/OpenSfM/blob/main/Dockerfile>`_ for the commands to install all dependencies on Ubuntu 20.04.
42
-
43
-
Alternatively, you can avoid using a docker image and install dependencies using Anaconda::
44
-
45
-
Download and install anaconda from anaconda.org
46
-
47
-
Close and re-open your terminal
48
-
49
-
Install the anaconda environment with:
50
-
51
-
conda env create --file conda.yml --yes
52
-
53
-
Activate the anaconda environment with::
34
+
You can then activate the anaconda environment with::
54
35
55
36
conda activate opensfm
56
37
57
-
Installing dependencies on Fedora
58
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59
-
60
-
Install anaconda using dnf with::
61
-
62
-
sudo dnf install conda
63
-
conda init
38
+
and you are ready to build OpenSfM.
64
39
65
-
Close and re-open your terminal
40
+
(Anaconda dependencies installation has been tested under MacOS (Sequoia), Ubuntu 24.04 and Fedora 42.)
66
41
67
-
Install the anaconda environment with:
42
+
Installing dependencies on Ubuntu
43
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68
44
69
-
conda env create --file conda.yml --yes
45
+
If you are not using conda, see this `Dockerfile <https://github.com/mapillary/OpenSfM/blob/main/Dockerfile>`_ for the commands to install all dependencies on Ubuntu 20.04.
70
46
71
-
Activate the anaconda environment with::
72
-
73
-
conda activate opensfm
74
47
75
48
Installing dependencies on MacOSX
76
49
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77
50
78
-
Install anaconda using brew with::
79
-
80
-
brew install --cask anaconda
81
-
export PATH='/Users/USERNAME/anaconda3/bin:$PATH'
82
-
conda init
83
-
84
-
Close and re-open your terminal
85
-
86
-
Install the conda environment with:
87
-
88
-
conda env create --file conda.yml --yes
89
-
90
-
Activate the conda environment with::
91
-
92
-
conda activate opensfm
93
-
94
-
.. note:: Note on OpenCV 3
95
-
When running OpenSfM on top of OpenCV version 3.0 the `OpenCV Contrib`_ modules are required for extracting SIFT or SURF features.
51
+
While it is possible to install all dependencies using brew, we recommend using the conda instructions above instead.
0 commit comments