.. figure:: /docs/images/scipion_logo.gif :width: 250 :alt: scipion logo .. _install-from-sources: ======================= Installing Scipion v3.0 ======================= Prepare installation ==================== pip === You need to have python2 or 3 already and pip or pip3. There are several ways to test if pip is installed. pip comes out of the box with conda. :: conda activate Will bring you pip. To test if you have pip available type: :: python -m pip -V Other alternatives would be: :: python3 -m pip -V pip -V pip3 -V If any of these commands does not fail, you have pip. If you don't have it please, check https://pip.pypa.io/en/stable/installing/ or use your package manager (yum, apt-get,...) to install pip or pip3. CUDA (optional, highly recommended): ==================================== Many of the software that Scipion integrates use CUDA. You can have different CUDA versions installed and choose which CUDA to use for any particular software. Nevertheless, CUDA 10.1 seems to be compatible with the majority of them. We recommend to have CUDA 10.1 installed and being linked at /usr/local/cuda. By default scipion point to /usr/local/cuda and xmipp installation is done against this path. Conda (optional, recommended if you are not admin) ================================================== Although conda is not a requirement, conda provides most of the dependencies Scipion and Xmipp needs and can be installed without being admin. Miniconda (https://docs.conda.io/en/latest/miniconda.html#linux-installers) would be enough. Scipion installation ==================== We have prepared some recipes to install Scipion and its companion Xmipp in the most simplified way. Below you can find some installation hints that could help you to troubleshoot your case. Scipion can be installed using conda or virtualenv. Conda installation has one drawback: conda will not identify properly the fonts in your system and you will end up with a font we didn’t intend but readable and workable. Don't worry there is a `fix for this bellow `_. Ubuntu with conda ----------------- :: sudo apt-get install gcc-8 g++-8 libopenmpi-dev make conda activate export CXX_CUDA=g++-8 export PATH=$PATH:/usr/local/cuda/bin pip install --user scipion-installer python -m scipioninstaller /path/where/you/want/scipion -j 4 Ubuntu with virtualenv ---------------------- :: sudo apt-get install gcc g++ make libopenmpi-dev python3-tk libfftw3-dev libhdf5-dev libtiff-dev libjpeg-dev libsqlite3-dev openjdk-8-jdk export PATH=$PATH:/usr/local/cuda/bin python -m pip install --user scipion-installer python -m scipioninstaller /path/where/you/want/scipion -venv -j 4 CentOS with conda ----------------- :: sudo yum install gcc gcc-c++ openmpi-devel export PATH=$PATH:/usr/lib64/openmpi/bin/:/usr/local/cuda/bin conda activate pip install --user scipion-installer python3 -m scipioninstaller /path/where/you/want/scipion -j 4 CentOS with virtualenv ---------------------- :: sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm sudo dnf -y --enablerepo=PowerTools install libaec-devel sudo yum install gcc gcc-c++ make openmpi-devel python3-devel python3-tkinter wget fftw-devel hdf5-devel libtiff-devel libjpeg-devel sqlite-devel.x86_64 java-1.8.0-openjdk-devel export PATH=$PATH:/usr/lib64/openmpi/bin/:/usr/local/cuda/bin python3 -m pip install --user scipion-installer python3 -m scipioninstaller /path/where/you/want/scipion -venv -j 4 Launching scipion3 ------------------ Installation should have created a launching file at /scipion3. For convenience, create an **alias** in the ``.bashrc`` file located in ``/home//.bashrc`` that allows you to launch Scipion from any location on your computer. :: alias scipion3='/scipion3' You can always launch it like /scipion3 or ./scipion3 (if you are already in scipion's installation folder) Installing other EM Plugins =========================== Scipion3 can use many EM plugins. If you intend to develop some plugin, check the **For developers** section below. However, if you only want to use the plugin, just follow the **For users** section below. For users --------- To list and install plugins you can use the plugin manager (recommended) or, alternatively, use the `command line tool `__. To open the plugin manager, please run Scipion :: cd scipion ./scipion3 and choose **Others** > **Plugin manager** on the top bar. There, any plugin can be easily installed. Please, refer to the :ref:`Plugin manager guide ` to get more details about plugin installation options. For developers -------------- Developers might want to build xmipp from the latest development version, please head `here `__ if this is your case. You might also want to check how to :ref:`install plugins from the command line `. Optional steps ============== Fixing fonts in a conda installation ------------------------------------ This will fix the fonts issue when using a conda installation :: conda activate .scipion3env (all commands below are inside this env) conda remove tk --force (removes bad tk) wget https://anaconda.org/scipion/tk/8.6.10/download/linux-64/tk-8.6.10-h14c3975_1005.tar.bz2 conda install tk-8.6.10-h14c3975_1005.tar.bz2 Test the installation and learn how to use Scipion -------------------------------------------------- We also provide some :ref:`tests ` and :ref:`tutorials ` to check that all is fine and to learn how to use Scipion. Configure --------- Scipion3 can be run without any configuration file. If you want to know what are the default values type: :: scipion3 printenv If you are installing Scipion in a cluster or you want to change the default values you can proceed to generate the configuration files. If you had a previous Scipion installation, it is a good idea to make a copy of your current home config file ``~/.config/scipion/scipion.conf`` Now run: :: ./scipion3 config You will be asked to share **scipion usage only** data. Sharing `usage data `_ will help to make Scipion better. This command will generate 3 configuration files at /config. If everything is OK (all green in the output) you can proceed to the next step. If there is a problem (red colored output), you will need to edit ``config/scipion.conf`` file in your preferred text editor and run ``./scipion3 config`` again. One known change for **Ubuntu 18** and **CentOS** are the MPI paths in ``/config/scipion.conf``: For **Ubuntu 18**: :: MPI_LIBDIR = /usr/lib/x86_64-linux-gnu/openmpi/lib MPI_INCLUDE = /usr/lib/x86_64-linux-gnu/openmpi/include/ For **CentOS**: :: MPI_BINDIR = /usr/lib64/openmpi/bin MPI_LIBDIR = /usr/lib64/openmpi/lib MPI_INCLUDE = /usr/include/openmpi-x86_64 Read more about :doc:`editing the configuration file `. The file ``config/hosts.conf`` contains some properties of the execution machine. This configuration file is particularly important for clusters that use a Queue System. If you are installing Scipion on a cluster, you probably will want to check :doc:`how to configure an execution host `. If you have problems compiling Scipion, see `Troubleshooting `__ page. Cleaning up (Optional) ====================== After Scipion is installed and properly working (see how to run tests in the next section) one could clean some temporary files to free some disk space after installation. Remove the files under ``software/tmp`` folder: :: rm -rf sofware/tmp/* The downloaded .tgz files of the EM packages can also be removed: :: rm -rf sofware/em/*.tgz Tests and tutorials =================== - Test your installation by running at least the *Small* and *Medium* tests mentioned in :ref:`running tests page `. - Complete some of the :ref:`Scipion Tutorials `.