Procedure
- I reviewed the packages available
– yum list – output of ‘yum list’
see numpy and scipy but no pandas – means we might have to compile.
2. Install development packages
root@graviton~]# sudo yum install "@Development tools" python3-pip python3-devel blas-devel gcc-gfortran lapack-devel .... Installed: autoconf.noarch 0:2.69-11.amzn2 automake.noarch 0:1.13.4-3.1.amzn2 bison.aarch64 0:3.0.4-6.amzn2.0.2 byacc.aarch64 0:1.9.20130304-3.amzn2.0.2 cscope.aarch64 0:15.8-10.amzn2.0.2 ctags.aarch64 0:5.8-13.amzn2.0.2 diffstat.aarch64 0:1.57-4.amzn2.0.2 doxygen.aarch64 1:1.8.5-4.amzn2 elfutils.aarch64 0:0.176-2.amzn2 flex.aarch64 0:2.5.37-3.amzn2.0.3 gcc-c++.aarch64 0:7.3.1-12.amzn2 indent.aarch64 0:2.2.11-13.amzn2.0.2 intltool.noarch 0:0.50.2-7.amzn2 lapack-devel.aarch64 0:3.4.2-8.amzn2.0.2 libtool.aarch64 0:2.4.2-22.2.amzn2.0.2 patch.aarch64 0:2.7.1-12.amzn2.0.2 patchutils.aarch64 0:0.3.3-4.amzn2.0.1 rcs.aarch64 0:5.9.0-5.amzn2.0.2 rpm-build.aarch64 0:4.11.3-40.amzn2.0.5 rpm-sign.aarch64 0:4.11.3-40.amzn2.0.5 subversion.aarch64 0:1.7.14-16.amzn2.0.1 swig.aarch64 0:3.0.12-11.amzn2.0.3 systemtap.aarch64 0:4.2-1.amzn2.0.1 Dependency Installed: avahi-libs.aarch64 0:0.6.31-20.amzn2 elfutils-libelf-devel.aarch64 0:0.176-2.amzn2 gdb.aarch64 0:8.0.1-30.amzn2.0.3 gettext-common-devel.noarch 0:0.19.8.1-3.amzn2 gettext-devel.aarch64 0:0.19.8.1-3.amzn2 gnutls.aarch64 0:3.3.29-9.amzn2 kernel-devel.aarch64 0:4.14.225-169.362.amzn2 libmodman.aarch64 0:2.0.1-8.amzn2.0.2 libproxy.aarch64 0:0.4.11-10.amzn2.0.3 m4.aarch64 0:1.4.16-10.amzn2.0.2 neon.aarch64 0:0.30.0-3.amzn2.0.2 pakchois.aarch64 0:0.4-10.amzn2.0.2 perl-Data-Dumper.aarch64 0:2.145-3.amzn2.0.2 perl-Test-Harness.noarch 0:3.28-3.amzn2 perl-Thread-Queue.noarch 0:3.02-2.amzn2 perl-XML-Parser.aarch64 0:2.41-10.amzn2.0.2 subversion-libs.aarch64 0:1.7.14-16.amzn2.0.1 systemtap-client.aarch64 0:4.2-1.amzn2.0.1 systemtap-devel.aarch64 0:4.2-1.amzn2.0.1 trousers.aarch64 0:0.3.14-2.amzn2.0.2 zlib-devel.aarch64 0:1.2.7-18.amzn2 Complete!
&
3. Install python-dev and upgrade pip
[ec2-user@graviton ~]$ sudo yum install python3-devel.aarch64 Loaded plugins: extras_suggestions, langpacks, priorities, update-motd amzn2-core | 3.7 kB 00:00 Resolving Dependencies --> Running transaction check ---> Package python3-devel.aarch64 0:3.7.9-1.amzn2.0.2 will be installed --> Processing Dependency: system-rpm-config for package: python3-devel-3.7.9-1.amzn2.0.2.aarch64 --> Processing Dependency: python3-rpm-macros for package: python3-devel-3.7.9-1.amzn2.0.2.aarch64 --> Running transaction check ---> Package python3-rpm-macros.noarch 0:3-23.amzn2 will be installed ---> Package system-rpm-config.noarch 0:9.1.0-76.amzn2.0.10 will be installed --> Processing Dependency: dwz >= 0.4 for package: system-rpm-config-9.1.0-76.amzn2.0.10.noarch --> Processing Dependency: perl-srpm-macros for package: system-rpm-config-9.1.0-76.amzn2.0.10.noarch --> Running transaction check ---> Package dwz.aarch64 0:0.11-3.amzn2.0.3 will be installed ---> Package perl-srpm-macros.noarch 0:1-8.amzn2.0.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: python3-devel aarch64 3.7.9-1.amzn2.0.2 amzn2-core 243 k Installing for dependencies: dwz aarch64 0.11-3.amzn2.0.3 amzn2-core 97 k perl-srpm-macros noarch 1-8.amzn2.0.1 amzn2-core 4.7 k python3-rpm-macros noarch 3-23.amzn2 amzn2-core 6.4 k system-rpm-config noarch 9.1.0-76.amzn2.0.10 amzn2-core 80 k Transaction Summary ================================================================================ Install 1 Package (+4 Dependent packages) Total download size: 431 k Installed size: 1.1 M Is this ok [y/d/N]: y Downloading packages: (1/5): perl-srpm-macros-1-8.amzn2.0.1.noarch.rpm | 4.7 kB 00:00 (2/5): dwz-0.11-3.amzn2.0.3.aarch64.rpm | 97 kB 00:00 (3/5): python3-devel-3.7.9-1.amzn2.0.2.aarch64.rpm | 243 kB 00:00 (4/5): python3-rpm-macros-3-23.amzn2.noarch.rpm | 6.4 kB 00:00 (5/5): system-rpm-config-9.1.0-76.amzn2.0.10.noarch.rpm | 80 kB 00:00 -------------------------------------------------------------------------------- Total 2.9 MB/s | 431 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : python3-rpm-macros-3-23.amzn2.noarch 1/5 Installing : dwz-0.11-3.amzn2.0.3.aarch64 2/5 Installing : perl-srpm-macros-1-8.amzn2.0.1.noarch 3/5 Installing : system-rpm-config-9.1.0-76.amzn2.0.10.noarch 4/5 Installing : python3-devel-3.7.9-1.amzn2.0.2.aarch64 5/5 Verifying : python3-devel-3.7.9-1.amzn2.0.2.aarch64 1/5 Verifying : perl-srpm-macros-1-8.amzn2.0.1.noarch 2/5 Verifying : dwz-0.11-3.amzn2.0.3.aarch64 3/5 Verifying : system-rpm-config-9.1.0-76.amzn2.0.10.noarch 4/5 Verifying : python3-rpm-macros-3-23.amzn2.noarch 5/5 Installed: python3-devel.aarch64 0:3.7.9-1.amzn2.0.2 Dependency Installed: dwz.aarch64 0:0.11-3.amzn2.0.3 perl-srpm-macros.noarch 0:1-8.amzn2.0.1 python3-rpm-macros.noarch 0:3-23.amzn2 system-rpm-config.noarch 0:9.1.0-76.amzn2.0.10 Complete!
— upgrade pip
[ec2-user@graviton ~]$ python -m pip install --upgrade pip [ec2-user@graviton ~]$ pip list | grep pip pip 21.0.1 [ec2-user@gravioton ~]$ pip list | grep setuptools setuptools 54.2.0
— install cython, numpy and scipy
[ec2-user@graviton ~]$ pip install Cython [ec2-user@graviton ~]$ pip install numpy [ec2-user@graviton ~]$ pip install scipy.
Now onto installing pandas – WARNING – can take 20 minutes. It has to compile for ARM64
[ec2-user@graviton ~]$ pip install pandas Collecting pandas Using cached pandas-1.2.3.tar.gz (5.5 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/site-packages (from pandas) (2021.1) Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/site-packages (from pandas) (2.8.1) Requirement already satisfied: numpy>=1.16.5 in /usr/local/lib64/python3.7/site-packages (from pandas) (1.20.2) Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0) Building wheels for collected packages: pandas Building wheel for pandas (PEP 517) ... /^canceled ERROR: Operation cancelled by user [root@ip-172-31-44-107 ~]# pip --version pip 21.0.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7) [root@ip-172-31-44-107 ~]# pip install pandas Collecting pandas Using cached pandas-1.2.3.tar.gz (5.5 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/site-packages (from pandas) (2.8.1) Requirement already satisfied: numpy>=1.16.5 in /usr/local/lib64/python3.7/site-packages (from pandas) (1.20.2) Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/site-packages (from pandas) (2021.1) Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0) Building wheels for collected packages: pandas Building wheel for pandas (PEP 517) ... done Created wheel for pandas: filename=pandas-1.2.3-cp37-cp37m-linux_aarch64.whl size=28004862 sha256=f9d9cd1474926b35f2c290f96c234b5236dbfe52e2a41b5b932bbad4267be746 Stored in directory: /root/.cache/pip/wheels/ac/43/a6/2e727abb256109d77a5c88776edf4b52a778178082c7a779b1 Successfully built pandas Installing collected packages: pandas Successfully installed pandas-1.2.3 [ec2-user@graviton ~]$
Want to run Jupyther Notebook
[ec2-user@graviton ~]$ pip install jupyter
Then start jupyter – jupyter notebook –port 8884
This site was? how do I say it?
Relevant!! Finally I’ve found something which helped me.
Many thanks!