Skip to content

Commit 2de0185

Browse files
committed
Add more details to python2/3 installation doc
1 parent b5fbccf commit 2de0185

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

doc/sphinxdoc/installing.rst

+13-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Note that packages location for Python installed via Homebrew is different from
1212

1313
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
1414

15-
at the bottom of your ``~/.bash_profile`` file. More information about using Python and Homebrew is `here <https://github.com/Homebrew/brew/blob/master/docs/Homebrew-and-Python.md>`_.
15+
at the bottom of your ``~/.bash_profile`` file. More information about using Python and Homebrew is `here <https://docs.brew.sh/Homebrew-and-Python>`_.
1616

1717

1818
Linux
@@ -57,14 +57,15 @@ You can install those dependencies on a Debian/Ubuntu system from official repos
5757

5858
sudo apt-get install build-essential libyaml-dev libfftw3-dev libavcodec-dev libavformat-dev libavutil-dev libavresample-dev python-dev libsamplerate0-dev libtag1-dev libchromaprint-dev python-six
5959

60-
In order to use python bindings for the library, you might also need to install python-dev, python-numpy-dev (or python-numpy on Ubuntu) and python-yaml for YAML support in python::
60+
In order to use Python 2 bindings for the library, you might also need to install python-dev, python-numpy-dev (or python-numpy on Ubuntu) and python-yaml for YAML support in python::
6161

6262
sudo apt-get install python-dev python-numpy-dev python-numpy python-yaml
6363

64-
Similarly, in the case of Python3 install::
64+
Similarly, in the case of Python 3 install::
6565

6666
sudo apt-get install python3-dev python3-numpy-dev python3-numpy python3-yaml
6767

68+
On Ubuntu/Debian, make sure that ``/usr/local/lib/python3/dist-packages/`` path is included in the list of Python 3 `module search paths <https://docs.python.org/3/tutorial/modules.html#the-module-search-path>`_. If it is not included by default, you can configure it in the PYTHONPATH variable.
6869

6970
Note that, depending on the version of Essentia, different versions of libav* and libtag1-dev packages are required. See `release notes for official releases <https://github.com/MTG/essentia/releases>`_.
7071

@@ -138,12 +139,20 @@ To install the C++ library, python bindings, extractors and Vamp plugin (if conf
138139

139140
Compiling for Python3
140141
---------------------
141-
The waf build scripts are python scripts themselves. They will configure Essentia to be used with the same Python that was used to execute them. In the case if your default python is not Python3, you will need to run all waf commands with python3::
142+
The waf build script is a python script itself. By default it will configure Essentia to be built for the same Python that was used to execute this script. Alternatively, you can specify a specific Python binary to build for using the ``--python=PYTHON`` configuration option.
143+
144+
Therefore, to build for Python3, you can either run all waf commands with your python3::
142145

143146
python3 ./waf configure --build-static --with-python --with-cpptests --with-examples --with-vamp
144147
python3 ./waf
145148
python3 ./waf install
146149

150+
or specify the ``--python`` option, for example:
151+
152+
./waf configure --build-static --with-python --python=/usr/bin/python3 --with-cpptests --with-examples --with-vamp
153+
./waf
154+
./waf install
155+
147156

148157
Running tests (optional)
149158
------------------------

0 commit comments

Comments
 (0)