.. This file is part of Sympathy for Data. .. .. Copyright (c) 2017 System Engineering Software Society .. .. Sympathy for Data is free software: you can redistribute it and/or modify .. it under the terms of the GNU General Public License as published by .. the Free Software Foundation, either version 3 of the License, or .. (at your option) any later version. .. .. Sympathy for Data is distributed in the hope that it will be useful, .. but WITHOUT ANY WARRANTY; without even the implied warranty of .. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .. GNU General Public License for more details. .. You should have received a copy of the GNU General Public License .. along with Sympathy for Data. If not, see . Installation instructions ========================= For Windows ----------- Download the latest version of Sympathy from the `official homepage `_. If you are using any custom node libraries then make sure to select the same Python version (Python 2 or Python 3) as the libraries have been written for. After downloading, run the installer and follow the instructions. This will install Sympathy as well as a custom Python version with all dependencies for it. For Linux --------- These installation instructions have been written for Ubuntu 16.04 which is the only officially supported Linux distribution for Sympathy for Data. Nonetheless, these instructions should also serve as a starting point for later versions of Ubuntu or other Linux distributions. Before you start either installation, make sure that your computer is internet connected and have the latest version of all packages. If unsure, run the commands: .. code-block:: bash sudo apt-get update sudo apt-get dist-upgrade You can install Sympathy either for Python 3 (recommended) or Python 2.7. Installing Sympathy for Python 3 under Linux ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start by installing the required prerequisites .. code-block:: bash sudo apt-get install build-essential cmake qt4-default python3-pip python3-pyodbc sudo -H pip3 install scikit-image sudo -H pip3 install scikit-learn Since modern Ubuntu have a later version of Python 3 (3.5 or later) not directly supported by PySide we need to use the version given by the distribution. If you are installing under a non-supported Linux system you can try without this step if your ``python3 --version`` shows 3.4 or earlier. .. code-block:: bash sudo apt-get install python3-pyside cd /usr/lib/python3/dist-packages sudo bash -c "cat >PySide-1.2.2.egg-info <`_. Assuming that you have downloaded it as the file 'Sympathy-VERSION.whl' you can install it by running the following commands *from the folder where you downloaded it*: .. code-block:: bash sudo -H pip3 install Sympathy-VERSION.whl sudo -H python3 -m sympathy_app syg Note that the last command launches Symapthy graphically as root so that the installation can be finished. Close without doing anything else and continue by launching Sympathy as a normal user (see below). If you haven't done so take a look at the :ref:`quick_start` pages in the documentation. For other Linux distributions than Ubuntu 16.04: if you see any text in red during the above command then some package may be missing. Read the part in red and install the required package before trying again. The preference is always to use a package provided by your distribution (eg. ``sudo apt-get install python3-xxx``), or in second hand one using 'pip3' directly (eg. ``sudo -H pip3 install xxx``). Installing Sympathy for Python 2.7 under Linux ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start by installing the required prerequisites .. code-block:: bash sudo apt-get install build-essential cmake qt4-default python-pip python-pyodbc sudo -H pip install scikit-image sudo -H pip install scikit-learn As an optional step you can use the distributions version of PySide (a wrapper library for Qt). If you do not perform this step then the installation will recompile a fresh version of PySide -- a process which take about 20 minutes. .. code-block:: bash sudo apt-get install python-pyside cd /usr/lib/python2.7/dist-packages sudo bash -c "cat >PySide-1.2.2.egg-info <`_. Assuming that you have downloaded it as the file 'Sympathy-VERSION.whl' you can install it by running the following commands *from the folder where you downloaded it*: .. code-block:: bash sudo -H pip install Sympathy-VERSION.whl sudo -H python -m sympathy_app syg Note that the last command launches Symapthy graphically as root so that the installation can be finished. Close without doing anything else and continue by launching Sympathy as a normal user (see below). If you haven't done so take a look at the :ref:`quick_start` pages in the documentation. For other Linux distributions than Ubuntu 16.04: if you see any text in red during the above command then some package may be missing. Read the part in red and install the required package before trying again. The preference is always to use a package provided by your distribution (eg. ``sudo apt-get install python-xxx``), or in second hand one using 'pip' directly (eg. ``sudo -H pip install xxx``). Running Sympathy from Linux ~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can run Sympathy from Linux either with a GUI (first command below), or for data processing applications in head-less mode (second command) For Python 3: .. code-block:: bash python3 -m sympathy_app syg python3 -m sympathy_app sy For Python 2.7: .. code-block:: bash python -m sympathy_app syg python -m sympathy_app sy Finally, you can find the example that are installed with Sympathy under the default installation path: .. code-block:: bash /usr/local/lib/python3.5/dist-packages/sympathy_app/Library/Examples Linux specific troubleshooting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If Sympathy hangs when you try to start it with *python3 -m sympathy_app syg* as a normal user, then it is possible that you have run it once with *sudo* without the *-H* flag. This leads to root owning all the cache files. The best way out of this is to run the following commands: .. code-block:: bash cd sudo chown -r MYNAME:MYGROUP .cache/Sympathy\ for\ Data/ sudo chown -r MYNAME:MYGROUP .local/share/data/Sympathy\ for\ Data/ Where you need to replace *MYNAME* and *MYGROUP* with your username and group (often the same as the username). If this doesn't solve the problem, try launching Sympathy using the *strace* command .. code-block:: bash strace python3 -m sympathy_app syg This will make alot of printouts of all system calls, you can break with Ctrl-C and look for any *permission denied* printouts.