Skip to content

Instantly share code, notes, and snippets.

View qgis3_standalone_osx.py
"""
Standalone python script for QGIS3 on OSX.
"""
import os
import sys
# Define plugin locations from QGIS3
sys.path.append('/Applications/QGIS3.app/Contents/Resources/python/')
sys.path.append('/Applications/QGIS3.app/Contents/Resources/python/plugins')
# Define Qt5 plugin path since Qt5 can't find it
@dmofot
dmofot / fix.md
Last active Oct 10, 2017
How to fix RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
View fix.md

Had an issue after upgrading QGIS. For some reason it was picking up an older version of numpy and throwing the error:

RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9

Turns out the system python had an old version of numpy installed. To figure this out:

$ /usr/bin/python
Python 2.7.10 (default, Feb  7 2017, 00:08:15)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
@dmofot
dmofot / multiple-csv-merge.ipynb
Created Sep 6, 2017
multiple-csv-merge.ipynb
View multiple-csv-merge.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmofot
dmofot / timeseries.ipynb
Created Feb 11, 2017
Working with time series data using pandas and matplotlib
View timeseries.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmofot
dmofot / 14.pip
Created Nov 28, 2016
$HOME/Library/Logs/Homebrew/mapbox/14.pip
View 14.pip
2016-11-28 09:15:35 -0500
/usr/local/Cellar/mapbox/0.5.1/libexec/bin/pip
install
-v
--no-deps
--no-binary
:all:
--ignore-installed
/private/tmp/mapbox--polyline-20161128-37707-19tydax/polyline-1.3.1
View vt_breweries.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View vt_cheese_trail.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
Hello, world! This has been revised...
View mtvernon.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.