From 26064a649c2e19574277e5471d514699245f29ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Andr=C3=A9s=20Margffoy=20Tuay?= Date: Fri, 16 Jun 2017 17:56:24 -0500 Subject: [PATCH 1/3] Added conda installation instructions --- ...Dependencies Installation-checkpoint.ipynb | 87 +++++++++++++++++++ Dependencies Installation.ipynb | 87 +++++++++++++++++++ 2 files changed, 174 insertions(+) create mode 100644 .ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb create mode 100644 Dependencies Installation.ipynb diff --git a/.ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb b/.ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb new file mode 100644 index 0000000..a2e4f3c --- /dev/null +++ b/.ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb @@ -0,0 +1,87 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Dependencies installation \n", + "\"Conda\n", + "\n", + " \n", + "Until now, we have used pip to download and distribute Open Source Python packages along all Operating Systems, which is great! But sometimes we need to install other Non-Python dependencies such as C/C++ libraries or other applications. Normally we would download sources, compile them and install them in our systems, which imply having superuser/administration permissions, modifying system environment variables and some other sensible stuff that takes a lot of time and most of the time fails.\n", + "\n", + "To tackle these issues, Anaconda offers its own package distribution manager (Conda), an OS-agnostic package manager that not only allows to install regular Python packages, but it also allows to install binary applications, libraries and other programs that may imply compilation and linking. Conda also allows to install software on restricted environments such as non-superuser accounts or High Performance Computing clusters and it allows to mantain different versions of the same software on a single session by allowing virtual environment creation, as we will see later. \n", + "\n", + "**Note:** Conda comes packaged by default on Anaconda\n", + "\n", + "## Installing software using conda\n", + "To install software using conda, we just need to emit the command ``conda install ``. For example, if we were like to install ``numpy``, we would just simply execute:\n", + "```\n", + "conda install numpy\n", + "```\n", + "By default, conda searches packages on the Anaconda default channel: https://anaconda.org/anaconda/repo, however, other users can offer packages as well. To download from other channels, we need to add the ``-c`` flag to our previous command. For instance if we were to install the VTK library available at the conda-forge channel (https://anaconda.org/conda-forge/repo), we would execute the following instruction:\n", + "```\n", + "conda install vtk -c conda-forge\n", + "```\n", + "\n", + "**Note:** The conda-forge contains more packages than the anaconda channel, and some libraries might be more updated than their counterparts at the anaconda channel\n", + "\n", + "### Don't know if a package is available?\n", + "Don't worry, you can search a conda package using ``anaconda search``\n", + "```\n", + "anaconda search -t conda pytorch\n", + "```\n", + "\n", + "## Conda environments\n", + "Sometimes a library might have a version or a dependency conflict with other system installed package. For instance, suppose we've installed Python 3.6 by default and we would like to download a library that is only Python2-compatible. If we were on a common system, we would just try to downgrade our Python version and hope that all the previously Py3 installed packages don't break at all. \n", + "\n", + "With conda we can create virtual environments that contain different software and libraries, one independent of the other and independent of system libraries. This ensures that all libraries are inter-compatible and don't present version nor dependency conflicts. It also allows to install software on restricted environments on which an user might not have superuser permissions, such as in a HPC cluster.\n", + "\n", + "To create a conda environment, we use the ``conda create`` command, _e.g.,_\n", + "```\n", + "conda create -n myenv\n", + "```\n", + "\n", + "**Note:** Conda uses the ``root`` environment by default.\n", + "\n", + "After creating an environment, we must activate it if we want to use or install software:\n", + "```bash\n", + "source activate myenv # On Linux and OSX\n", + "activate myenv # Windows\n", + "```\n", + "\n", + "If we want to return to our ``root`` environment, we just need to emit the deactivation command:\n", + "```bash\n", + "source deactivate # Linux and OSX\n", + "deactivate # Windows\n", + "```\n", + "\n", + "# Course packages\n", + "**Note:** This list is subject to changes during the following days.\n", + "\n", + "* **VTK :** ``conda install vtk -c clinicalgraphics``" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.0" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Dependencies Installation.ipynb b/Dependencies Installation.ipynb new file mode 100644 index 0000000..a2e4f3c --- /dev/null +++ b/Dependencies Installation.ipynb @@ -0,0 +1,87 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Dependencies installation \n", + "\"Conda\n", + "\n", + " \n", + "Until now, we have used pip to download and distribute Open Source Python packages along all Operating Systems, which is great! But sometimes we need to install other Non-Python dependencies such as C/C++ libraries or other applications. Normally we would download sources, compile them and install them in our systems, which imply having superuser/administration permissions, modifying system environment variables and some other sensible stuff that takes a lot of time and most of the time fails.\n", + "\n", + "To tackle these issues, Anaconda offers its own package distribution manager (Conda), an OS-agnostic package manager that not only allows to install regular Python packages, but it also allows to install binary applications, libraries and other programs that may imply compilation and linking. Conda also allows to install software on restricted environments such as non-superuser accounts or High Performance Computing clusters and it allows to mantain different versions of the same software on a single session by allowing virtual environment creation, as we will see later. \n", + "\n", + "**Note:** Conda comes packaged by default on Anaconda\n", + "\n", + "## Installing software using conda\n", + "To install software using conda, we just need to emit the command ``conda install ``. For example, if we were like to install ``numpy``, we would just simply execute:\n", + "```\n", + "conda install numpy\n", + "```\n", + "By default, conda searches packages on the Anaconda default channel: https://anaconda.org/anaconda/repo, however, other users can offer packages as well. To download from other channels, we need to add the ``-c`` flag to our previous command. For instance if we were to install the VTK library available at the conda-forge channel (https://anaconda.org/conda-forge/repo), we would execute the following instruction:\n", + "```\n", + "conda install vtk -c conda-forge\n", + "```\n", + "\n", + "**Note:** The conda-forge contains more packages than the anaconda channel, and some libraries might be more updated than their counterparts at the anaconda channel\n", + "\n", + "### Don't know if a package is available?\n", + "Don't worry, you can search a conda package using ``anaconda search``\n", + "```\n", + "anaconda search -t conda pytorch\n", + "```\n", + "\n", + "## Conda environments\n", + "Sometimes a library might have a version or a dependency conflict with other system installed package. For instance, suppose we've installed Python 3.6 by default and we would like to download a library that is only Python2-compatible. If we were on a common system, we would just try to downgrade our Python version and hope that all the previously Py3 installed packages don't break at all. \n", + "\n", + "With conda we can create virtual environments that contain different software and libraries, one independent of the other and independent of system libraries. This ensures that all libraries are inter-compatible and don't present version nor dependency conflicts. It also allows to install software on restricted environments on which an user might not have superuser permissions, such as in a HPC cluster.\n", + "\n", + "To create a conda environment, we use the ``conda create`` command, _e.g.,_\n", + "```\n", + "conda create -n myenv\n", + "```\n", + "\n", + "**Note:** Conda uses the ``root`` environment by default.\n", + "\n", + "After creating an environment, we must activate it if we want to use or install software:\n", + "```bash\n", + "source activate myenv # On Linux and OSX\n", + "activate myenv # Windows\n", + "```\n", + "\n", + "If we want to return to our ``root`` environment, we just need to emit the deactivation command:\n", + "```bash\n", + "source deactivate # Linux and OSX\n", + "deactivate # Windows\n", + "```\n", + "\n", + "# Course packages\n", + "**Note:** This list is subject to changes during the following days.\n", + "\n", + "* **VTK :** ``conda install vtk -c clinicalgraphics``" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.0" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From fc559c259c260f3ad17dc4eb58b2b064b3244375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Andr=C3=A9s=20Margffoy=20Tuay?= Date: Fri, 16 Jun 2017 18:00:25 -0500 Subject: [PATCH 2/3] Minor grammar corrections --- .ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb | 2 +- Dependencies Installation.ipynb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb b/.ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb index a2e4f3c..0972556 100644 --- a/.ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb +++ b/.ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb @@ -10,7 +10,7 @@ " \n", "Until now, we have used pip to download and distribute Open Source Python packages along all Operating Systems, which is great! But sometimes we need to install other Non-Python dependencies such as C/C++ libraries or other applications. Normally we would download sources, compile them and install them in our systems, which imply having superuser/administration permissions, modifying system environment variables and some other sensible stuff that takes a lot of time and most of the time fails.\n", "\n", - "To tackle these issues, Anaconda offers its own package distribution manager (Conda), an OS-agnostic package manager that not only allows to install regular Python packages, but it also allows to install binary applications, libraries and other programs that may imply compilation and linking. Conda also allows to install software on restricted environments such as non-superuser accounts or High Performance Computing clusters and it allows to mantain different versions of the same software on a single session by allowing virtual environment creation, as we will see later. \n", + "To tackle these issues, Anaconda offers its own package distribution manager (Conda), an OS-agnostic package manager that not only allows to install regular Python packages, but it also allows to install binary applications, libraries and other programs that may imply compilation and linking. Conda also allows to install software on restricted environments such as non-superuser accounts or High Performance Computing clusters and it also allows to mantain different versions of the same software on a single session by allowing virtual environment creation, as we will see later. \n", "\n", "**Note:** Conda comes packaged by default on Anaconda\n", "\n", diff --git a/Dependencies Installation.ipynb b/Dependencies Installation.ipynb index a2e4f3c..0972556 100644 --- a/Dependencies Installation.ipynb +++ b/Dependencies Installation.ipynb @@ -10,7 +10,7 @@ " \n", "Until now, we have used pip to download and distribute Open Source Python packages along all Operating Systems, which is great! But sometimes we need to install other Non-Python dependencies such as C/C++ libraries or other applications. Normally we would download sources, compile them and install them in our systems, which imply having superuser/administration permissions, modifying system environment variables and some other sensible stuff that takes a lot of time and most of the time fails.\n", "\n", - "To tackle these issues, Anaconda offers its own package distribution manager (Conda), an OS-agnostic package manager that not only allows to install regular Python packages, but it also allows to install binary applications, libraries and other programs that may imply compilation and linking. Conda also allows to install software on restricted environments such as non-superuser accounts or High Performance Computing clusters and it allows to mantain different versions of the same software on a single session by allowing virtual environment creation, as we will see later. \n", + "To tackle these issues, Anaconda offers its own package distribution manager (Conda), an OS-agnostic package manager that not only allows to install regular Python packages, but it also allows to install binary applications, libraries and other programs that may imply compilation and linking. Conda also allows to install software on restricted environments such as non-superuser accounts or High Performance Computing clusters and it also allows to mantain different versions of the same software on a single session by allowing virtual environment creation, as we will see later. \n", "\n", "**Note:** Conda comes packaged by default on Anaconda\n", "\n", From ad26ccebacc5c233d988c75c81dce47e6cd86ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Andr=C3=A9s=20Margffoy=20Tuay?= Date: Fri, 16 Jun 2017 18:02:44 -0500 Subject: [PATCH 3/3] Update conda install example --- .ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb | 4 ++-- Dependencies Installation.ipynb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb b/.ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb index 0972556..d10726d 100644 --- a/.ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb +++ b/.ipynb_checkpoints/Dependencies Installation-checkpoint.ipynb @@ -19,9 +19,9 @@ "```\n", "conda install numpy\n", "```\n", - "By default, conda searches packages on the Anaconda default channel: https://anaconda.org/anaconda/repo, however, other users can offer packages as well. To download from other channels, we need to add the ``-c`` flag to our previous command. For instance if we were to install the VTK library available at the conda-forge channel (https://anaconda.org/conda-forge/repo), we would execute the following instruction:\n", + "By default, conda searches packages on the Anaconda default channel: https://anaconda.org/anaconda/repo, however, other users can offer packages as well. To download from other channels, we need to add the ``-c`` flag to our previous command. For instance if we were to install the OpenCV library available at the conda-forge channel (https://anaconda.org/conda-forge/repo), we would execute the following instruction:\n", "```\n", - "conda install vtk -c conda-forge\n", + "conda install opencv -c conda-forge\n", "```\n", "\n", "**Note:** The conda-forge contains more packages than the anaconda channel, and some libraries might be more updated than their counterparts at the anaconda channel\n", diff --git a/Dependencies Installation.ipynb b/Dependencies Installation.ipynb index 0972556..d10726d 100644 --- a/Dependencies Installation.ipynb +++ b/Dependencies Installation.ipynb @@ -19,9 +19,9 @@ "```\n", "conda install numpy\n", "```\n", - "By default, conda searches packages on the Anaconda default channel: https://anaconda.org/anaconda/repo, however, other users can offer packages as well. To download from other channels, we need to add the ``-c`` flag to our previous command. For instance if we were to install the VTK library available at the conda-forge channel (https://anaconda.org/conda-forge/repo), we would execute the following instruction:\n", + "By default, conda searches packages on the Anaconda default channel: https://anaconda.org/anaconda/repo, however, other users can offer packages as well. To download from other channels, we need to add the ``-c`` flag to our previous command. For instance if we were to install the OpenCV library available at the conda-forge channel (https://anaconda.org/conda-forge/repo), we would execute the following instruction:\n", "```\n", - "conda install vtk -c conda-forge\n", + "conda install opencv -c conda-forge\n", "```\n", "\n", "**Note:** The conda-forge contains more packages than the anaconda channel, and some libraries might be more updated than their counterparts at the anaconda channel\n",