Installing Python packages on Amazon Linux

If you prefer another distribution, you can use your knowledge of that distribution to install Python, NumPy, and others. Here, we will do it on the standard Amazon distribution:

  1. We start by installing several basic Python packages as follows:
$ curl -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
$ chmod +x ./Miniconda3-latest-Linux-x86_64.sh
$ bash ./Miniconda3-latest-Linux-x86_64.sh
  1. Now, follow the basic instructions and set the PATH variable as instructed:
$ export PATH=/home/ec2-user/miniconda3/bin:$PATH  
  1. Now, we can create a new environment, which we call py3.6 (as it is a Python 3.6 environment) and activate it:
$ conda create -n py3.6 python=3.6 numpy scikit-learn
$ source activate py3.6  
  1. To install mahotas and jug, we add the conda-forge channel (it is generally a good idea to do so; it has many well-maintained packages):
$ conda config --add channels conda-forge
$ conda install mahotas imread jug git  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset