Skip to content

Instantly share code, notes, and snippets.

@henryiii henryiii/installsympy.py
Last active Aug 29, 2015

Embed
What would you like to do?
installsimpy
# Install SimPy
import urllib
import tarfile
import shutil
import console
import os
name = 'sympy'
version = '0.7.5'
# It is easy to install any pypi pure python package, for example:
# name = 'simpy'
# version = '3.0.2'
fullname = name+'-'+version
print 'Downloading '+name+'...'
url = 'https://pypi.python.org/packages/source/s/'+name+'/'+fullname+'.tar.gz'
urllib.urlretrieve(url, 'packget.tar.gz')
print 'Extracting...'
t = tarfile.open('packget.tar.gz')
t.extractall()
if os.path.isdir(name):
shutil.rmtree(name)
shutil.move(fullname+'/'+name, './'+name)
print 'Cleaning up...'
shutil.rmtree(fullname)
os.remove('packget.tar.gz')
print 'Done.'
@cclauss

This comment has been minimized.

Copy link

cclauss commented Jun 19, 2014

Sympy 0.7.4.1 is now a builtin module in Pythonista 1.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.