No module named osgeo.ogr
Problem is solved in this way:
(VIRTUAL_ENV)user@ubuntu:~$ pip install --no-install GDAL==1.11.2
1.11.2 because my version GDAL is 1.11.2:
(VIRTUAL_ENV)user@ubuntu:~$ gdal-config --version
1.11.2
next:
(VIRTUAL_ENV)user@ubuntu:~$ cd ~/.virtualenvs/VIRTUAL_ENV/build/GDAL/
(VIRTUAL_ENV)user@ubuntu:~/.virtualenvs/VIRTUAL_ENV/build/GDAL$ python setup.py build_ext --include-dirs=/usr/include/gdal/
(VIRTUAL_ENV)user@ubuntu:~/.virtualenvs/bamap/build/GDAL$ pip install --no-download GDAL
--include-dirs=/usr/include/gdal/
for me is correct. GDAL was installed with Quantum GIS in my system. If you will build GDAL manually paths may be others. Full version:
python setup.py build_ext --gdal-config=/YOUR_PATH/bin/gdal-config --library-dirs=/YOUR_PATH/gdal/VERSION_GDAL/lib --libraries=gdal --include-dirs=/YOUR_PATH/gdal/VERSION_GDAL/include
Details may find here.
Able to solve with this one
pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`