• Active Topics 

Python Packages for Scientific Computing

Including Cython, Jython, IronPython, PyPy, Django framework, and interpreters: Ipython, IPython Jupyter/Notebook, CPython


Post Reply
User avatar
Eli
Senior Expert Member
Reactions: 187
Posts: 5693
Joined: 10 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#1

We list and show how to install some regarded most useful Scientific Python Distributions which are central for scientific computing.

Note: Python packages can just be installed and uninstalled using pip. So you can use pip install or sudo apt to install packages in systems like Ubuntu Linux.

Firstly, install pip for Python 2:

Code: Select all

sudo apt-get install python-pip


or install pip for python 3:

Code: Select all

sudo apt-get install python3-pip

depending on which version of Python you use.

To upgrade pip, execute

Code: Select all

pip install --upgrade pip
Or

Code: Select all

pip3 install --upgrade pip

1. NumPy

NumPy is the fundamental package for scientific computing with Python. It contains several tools, functions and objects, and also codes written in C++/C and Fortran can easily be integrated with it. See more, http://www.numpy.org/

You can install python-numpy in Ubuntu Debian by scripting

Code: Select all

sudo apt-get install python-numpy
2. SciPy

SciPy is an open source Python library used by scientists, analysts, and engineers for scientific and technical computing.

Install it in Ubuntu or Debian distribution:

Code: Select all

sudo apt-get install python-scipy
Or

Code: Select all

sudo apt-get install python3-scipy
for python3.x

3. SciTools

SciTools is an additional scientific computing functionality in Python (extensions to NumPy/SciPy++). It contains many useful tools for scientific computing in Python. SciTools is built on top of other widely used packages such as NumPy, SciPy, ScientificPython, Matlotlib, Gnuplot, VisIt.

You can easily install this package in Ubuntu Debian via Terminal by executing

Code: Select all

 sudo apt-get install python-scitools
If you have Anaconda, SciTools is available as a conda package. To install, code

Code: Select all

conda install --channel johannr scitools
For more information about SciTools, visit https://github.com/hplgit/scitools

4. Ipython

IPython is a command shell (Terminal and Qt-based) for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history.

You can install Ipython in Ubuntu via Terminal as follows:

Code: Select all

pip install ipython
If pip is the old version, you can upgrade it by using the command

Code: Select all

pip install --upgrade pip
If you have Anaconda, Install/update Ipython available as a conda package:

Code: Select all

conda update conda
conda update ipython
See more about Ipython: https://ipython.org/install.html

5. Matplotlib

Matplotlib is a scientific plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI (graphical user-interface) toolkits like wxPython, Qt, or GTK+. Read more: https://en.wikipedia.org/wiki/Matplotlib

If you have Anaconda, miniconda or Enthought distribution (Canopy), Matplotlib is already available in these packages. You can update it via Terminal as follows:

Code: Select all

conda update conda
conda update matplotlib
If you are on Linux, you can use Synaptic Package Manager to install python-matplotlib. Matplotlib is packaged for almost every major Linux distribution.

It easily installs in Ubuntu via command line:

Code: Select all

sudo apt-get install python-matplotlib
6. Gnuplot

Gnuplot is a portable command-line driven graphing utility for Linux, OS/2, MS Windows, OSX, VMS, and many other platforms. See more: http://www.gnuplot.info (see demos as well: http://gnuplot.sourceforge.net/demo/)

Install Gnuplot in Ubuntu via Terminal:

Code: Select all

sudo apt-get update
sudo apt-get install gnuplot
Or install it as Python Anaconda package

Code: Select all

conda install -c bioconda gnuplot=5.0.3
7. Install Python development package (usually required as a dependency by some software, e.g., Python Healpy)

Code: Select all

sudo apt-get install python-dev
8. Cython

Look at http://docs.cython.org for installation procedure.

For more information on most famous Scientific Python Distributions, visit: http://www.scipy.org/install.html, http://matplotlib.org/users/installing.html,

See also:
https://www.tssfl.com/viewtopic.php?f=29&t=4377,

https://www.tssfl.com/viewtopic.php?f=29&t=1747
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 187
Posts: 5693
Joined: 10 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#2

Check examples how to use python matplotlib. See also colors in matplotlib.
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 187
Posts: 5693
Joined: 10 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#3

Can the J programming language https://www.jsoftware.com replace Numpy?
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 187
Posts: 5693
Joined: 10 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#4

0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 187
Posts: 5693
Joined: 10 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#5

Upgrade pip for the latest version of python3.11 in Ubuntu in 2023:

  1. python3.11 -m pip install --upgrade pip

0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 187
Posts: 5693
Joined: 10 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#6

Install openpyxl:

  1. pip install pandas openpyxl

0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 187
Posts: 5693
Joined: 10 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#7

Install kaleido package which is required for image export using the kaleido engine:

  1. pip install -U kaleido

0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 187
Posts: 5693
Joined: 10 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#8

0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
Post Reply

Return to “Python Programming”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest