Skip to content

Instantly share code, notes, and snippets.

@BrianChevalier
Created March 13, 2017 05:02
Show Gist options
  • Save BrianChevalier/a80ac584c45768bb6595c5a0513034b9 to your computer and use it in GitHub Desktop.
Save BrianChevalier/a80ac584c45768bb6595c5a0513034b9 to your computer and use it in GitHub Desktop.
Install SymPy.py
# Install SymPy
import urllib.request, urllib.parse, urllib.error
import tarfile
import shutil
import console
import os
print('Downloading SymPy...')
url = 'https://github.com/sympy/sympy/releases/download/sympy-1.0/sympy-1.0.tar.gz'
urllib.request.urlretrieve(url, 'sympy.tar.gz')
print('Extracting...')
t = tarfile.open('sympy.tar.gz')
t.extractall()
if os.path.isdir('sympy'):
shutil.rmtree('sympy')
shutil.move('sympy-1.0/sympy', './sympy')
print('Cleaning up...')
shutil.rmtree('sympy-1.0')
os.remove('sympy.tar.gz')
print('Done.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment