Мне нужно импортировать модуль osgeo.ogr
в virtualenv
python program.Нет модуля с именем osgeo.ogr
Global питон имеет этот модуль:
[email protected]:~/$ 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
>>>
Но в virtualenv (без --no-сайта-пакеты):
[email protected]:~$ 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
В чем причина такого поведения?
См. Http://stackoverflow.com/a/29792831/315168 –