forked from jkitchin/pycse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-pycse.py
31 lines (23 loc) · 1015 Bytes
/
install-pycse.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# for installing magic IPython stuff
# In ipython run this
# %load https://raw.github.com/jkitchin/pycse/master/install-pycse.py
from setuptools.command import easy_install
easy_install.main( ["-U","pycse"] )
# my customized pyreport
package = 'https://github.com/jkitchin/pyreport/archive/master.zip'
easy_install.main( ["-U",package] )
import IPython, os
IPydir = os.path.join(IPython.utils.path.get_ipython_dir(),
'profile_default',
'startup')
print 'Installing ipython magic to : ',IPydir
if not os.path.exists(IPydir):
raise Exception('No ipython directory found')
url = 'https://raw.github.com/jkitchin/pycse/master/pycse/00-pycse-magic.py'
import urllib
urllib.urlretrieve (url, os.path.join(IPydir,'00-pycse-magic.py'))
print 'Ipython magic installed now!'
# extra packages
easy_install.main( ["-U","quantities"] )
easy_install.main( ["-U","uncertainties"] )
print 'Extra packages now installed.'