Last active
December 11, 2015 03:09
-
-
Save schwehr/4535854 to your computer and use it in GitHub Desktop.
Quick tutorial for J.B. on fink and python
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
fink selfupdate | |
fink install python | |
fink install ipython2.7 | |
fink install shapely-py27 | |
fink install matplotlib-py27 scipy-py27 pandas-py27 # Good science packages | |
dpkg -L shapely-py27 # see all the files installed by fink for shapely | |
dpkg -L shapely-py27 | grep wkb | |
# /sw/lib/python2.7/site-packages/shapely/wkb.py | |
# /sw/lib/python2.7/site-packages/shapely/wkb.pyc | |
# Find what package a file belongs to | |
dpkg -S /sw/lib/python2.7/site-packages/shapely/wkb.py | |
shapely-py27: /sw/lib/python2.7/site-packages/shapely/wkb.py | |
type -a python | |
python is /sw/bin/python | |
python is /usr/bin/python | |
type -a ipython | |
ipython is /sw/bin/ipython | |
# NO NEED TO SET PYTHON PATH! | |
ipython | |
from shapely.geometry import Point | |
patch = Point(0.0, 0.0).buffer(10.0) | |
patch.area | |
# 313.6548490545939 | |
whos | |
exit # back to bash | |
fink list -m schwehr | head | |
fink list -m schwehr | wc -l | |
# 154 - yeah, lots of work for the last 10 years | |
fink list py27 # What is available for python | |
fink install yolk-py27 | |
yolk -U # see how far behind pypi fink packages are | |
# Where is the shapely-py.info file that defines shapely for fink? | |
mdfind shapely-py.info | grep shapely-py.info | |
# /sw/fink/10.7/stable/main/finkinfo/sci/shapely-py.info | |
# 10.8 and 10.7 share the same packages | |
less /sw/fink/10.8/stable/main/finkinfo/sci/shapely-py.info # See exactly how I built fink | |
grep perl /sw/fink/10.8/stable/main/finkinfo/sci/shapely-py.info # See how I patched shapely to find libgeos... | |
# perl -pi -e 's|/Library/Frameworks/GEOS.framework/Versions/Current/GEOS|%p/opt/libgeos3.3.3/lib/libgeos_c.1.dylib|g' shapely/geos.py | |
# Now use the brand new snazzy ipython web notebook interface... with plots inline and the ability to re-execute blocks and much more | |
ipython notebook --pylab=inline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment