4

How can you install the osgeo module in a virtualenv? I downloaded QGIS using KyngChaos (www.kyngchaos.com/software/qgis) following https://arset.gsfc.nasa.gov/sites/default/files/land/webinars/Advanced_Land_Classification/ARSET_Downloading_Installing_QGIS_Final.pdf (without the optional modules "GDAL Extras")

It seems to build all of the Python frameworks on my system's version of Python. I tried adding the path export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH to my bash profile but I still get ImportError: No module named osgeo.

I also tried following Install GDAL python package in virtualenv on mac but get this error when I try to python setup.py build:

extensions/gdal_wrap.cpp:3172:10: fatal error: 'cpl_vsi_error.h' file not found
#include "cpl_vsi_error.h"

The error persists after I modify the config.cfg file to my brew installed GDAL

[build_ext]
# gdal_config = ../../apps/gdal-config
gdal_config = /usr/local/bin/gdal-config

Any ideas?

I can't use my system version of python because I have OpenCV installed in a virtualenv.

  • please don't thank in advance, please give thanks by voting on answers – nmtoken Aug 18 '17 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.