I need to import osgeo.ogr
module to virtualenv
python program.
Global python has this module:
user@ubuntu:~/$ python
Python 2.7.8 (default, Oct 20 2014, 15:05:19)
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import osgeo
>>>
But into virtualenv (without --no-site-packages):
user@ubuntu:~$ temp/bin/python
Python 2.7.8 (default, Oct 20 2014, 15:05:19)
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import osgeo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named osgeo
What is the reason for this behavior?
Able to solve with this one
pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With