Mentions légales du service

Skip to content
Snippets Groups Projects
Commit cf32849c authored by hhakim's avatar hhakim
Browse files

Add a guide doc for installing pyfaust in python virtual environments.

parent 9b05cf9b
No related branches found
No related tags found
No related merge requests found
Pipeline #833849 skipped
......@@ -31,6 +31,7 @@ if(BUILD_DOCUMENTATION)
string(TIMESTAMP DOXYGEN_CURRENT_DATE "%Y-%m-%d - %H:%M")
if(EXCLUDE_FAUST_LIB_INSTALL)
file(READ mainpage_wrappers_inc.md INCLUDE_SPECIFIC_DOC)
configure_file(${FAUST_DOC_SRC_DIR}/install_pyfaust_in_venv.md ${PROJECT_BINARY_DIR}/doc//install_pyfaust_in_venv.md)
else()
file(READ mainpage_cpp_inc.md INCLUDE_SPECIFIC_DOC)
endif()
......
......@@ -458,6 +458,7 @@ WARN_LOGFILE = "@PROJECT_BINARY_DIR@/doc/doxygen.log"
INPUT = "@PROJECT_BINARY_DIR@/doc/mainpage.md" \
"@PROJECT_BINARY_DIR@/doc/README.md" \
"@PROJECT_BINARY_DIR@/doc/install_pyfaust_in_venv.md" \
"@FAUST_SRC_LINEAR_OPERATOR_DIR@" \
"@FAUST_ALGORITHM_CONSTRAINT_SRC_DIR@" \
"@FAUST_ALGORITHM_FACTORIZATION_SRC_DIR@" \
......
......@@ -12,7 +12,8 @@
### 1.1 For Python
@note this section is intended to describe installation of the FAµST Python wrapper only from system packages/installers but note that some pip packages are also available.
@note This section treats only of system packages/installers but note that some pip packages are also available. You might install them in virtual environments:
\ref install_pyfaust_in_venv
FAµST is designed for the Python ecosystem which as usual relies on the numpy and scipy packages.
......@@ -26,7 +27,7 @@ Please ensure these packages are installed on your system. One way to install th
Note that you probably have to install those packages for all versions of Python you want to use (each one have normally its associated pip executable).<br/>
Note also that you can rely on your system package manager to install the Python packages (e.g. dnf/yum repositories on Fedora/Centos Linux systems).
FAµST supports at least Python 2.7 and is also compiled for Python @PY3_VER@.
FAµST supports at least Python 2.7.15 and is also compiled for Python @PY3_VER@.
If you want to use FAµST with Python 3 you must use precisely the @PY3_VER@ version because the FAµST Python wrapper delivered within the binary package is compiled for that version only.
......
\page install_pyfaust_in_venv Installing pyfaust in Python virtual environments
Python @PY3_VER@
================
First, you need to create your virtual environment into a directory reserved to pyfaust:
$ python3 -m venv test_pyfaust-3.6
Second, you need to enable the virtual environment:
$ source ./test_pyfaust-3.6/bin/activate
\note For Windows users the command is rather:
C:\> call .\test_pyfaust-3.6\Scripts\activate
Then, if all worked correctly you must see the test_pyfaut-3.6 prompt of your virtual environment.
It remains now to install pyfaust in this environment.
$ pip install pyfaust-*.whl
All the dependencies will be downloaded and installed by the command above.
You can launch a test python command to valid the installation:
$ python -c 'from pyfaust import version; print(version())'
As as result, you should see the version of pyfaust installed if all went properly.
Python 2.7.15+
=============
You need at first to install virtualenv:
$ pip install virtualenv
NOTE: take care to use the good version of pip (corresponding to the python 2.7 version you want use).
Then you can create your python 2.7 virtual environment:
$ virtualenv test_pyfaust-2.7
The next is all the same as for python 3, you enter your virtual env.:
$ source ./test_pyfaust-2.7/bin/activate
\note For Windows users the command is rather:
C:\> call .\test_pyfaust-3.6\Scripts\activate
Install the pip wheel package:
$ pip install pyfaust-*.whl
And finally launch the version test command to check the whole process:
$ python -c 'from pyfaust import version; print(version())'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment