Created
March 13, 2017 05:02
-
-
Save BrianChevalier/a80ac584c45768bb6595c5a0513034b9 to your computer and use it in GitHub Desktop.
Install SymPy.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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