Skip to content

Instantly share code, notes, and snippets.

@mnadjit
Last active March 5, 2018 11:49
Show Gist options
  • Save mnadjit/545a74996974f7ac179d53528c471ed9 to your computer and use it in GitHub Desktop.
Save mnadjit/545a74996974f7ac179d53528c471ed9 to your computer and use it in GitHub Desktop.
Python - uninstall old version and install latest version
!#/bin/bash
package_name=python3.5
# Get list of all installed apps
apt list --installed | grep $package_name
# Uninstall old version of Python
apt-get remove $old_package_name
# Install latest version of Python
apt-get install $new_package_name # apt-get -s runs a simulation of installation process
$pythonVersion
# install MedPy python 2.x
apt-get install python-pip python-numpy python-scipy libboost-python-dev build-essential
pip install nibabel pydicom medpy
# install MedPy python 3.x
apt-get install python3-pip python3-numpy python3-scipy libboost-python-dev build-essential
pip3 install nibabel pydicom medpy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment