Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

"""
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 October 10, 2017 14:27
How to fix RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9

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 September 6, 2017 20:45
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 February 11, 2017 02:37
Working with time series data using pandas and matplotlib
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 November 28, 2016 16:10
$HOME/Library/Logs/Homebrew/mapbox/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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmofot
dmofot / index.html
Last active November 18, 2015 07:09
<!DOCTYPE html>
<meta charset="utf-8">
Hello, world! This has been revised...
@dmofot
dmofot / mtvernon.geojson
Created April 30, 2015 16:24
Mt. Vernon Trail
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.