Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@henryiii
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henryiii/9011826 to your computer and use it in GitHub Desktop.
Save henryiii/9011826 to your computer and use it in GitHub Desktop.
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
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