Skip to content

Commit f15d113

Browse files
author
Pau Gargallo
committed
Put conda instruction on a section of its own
1 parent 91602bc commit f15d113

File tree

1 file changed

+12
-56
lines changed

1 file changed

+12
-56
lines changed

doc/source/building.rst

Lines changed: 12 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -20,79 +20,35 @@ If you already have the code or you downloaded a release_, make sure to update t
2020
Install dependencies
2121
--------------------
2222

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.
2424

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.
2826

29-
Python dependencies can be installed with::
27+
Installing dependencies using Conda (recommended)
28+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3029

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::
3531

3632
conda env create --file conda.yml --yes
3733

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::
5435

5536
conda activate opensfm
5637

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.
6439

65-
Close and re-open your terminal
40+
(Anaconda dependencies installation has been tested under MacOS (Sequoia), Ubuntu 24.04 and Fedora 42.)
6641

67-
Install the anaconda environment with:
42+
Installing dependencies on Ubuntu
43+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6844

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.
7046

71-
Activate the anaconda environment with::
72-
73-
conda activate opensfm
7447

7548
Installing dependencies on MacOSX
7649
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7750

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.
9652

9753

9854
Installing dependencies on Windows

0 commit comments

Comments
 (0)