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:
- 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
- Now, follow the basic instructions and set the
PATH
variable as instructed:
$ export PATH=/home/ec2-user/miniconda3/bin:$PATH
- 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
- To install
mahotas
andjug
, we add theconda-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