Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Problem: I have a Windows XP machine with Python 2.7.3 installed at ‘C:\Python27' and the scipy module installed at ‘C:\Python27\Lib\site-packages'.

I installed QGIS 1.8 recently and started exploring plugins. One of the plugins I wanted to use required the scipy module, which, as mentioned above, was already installed. However, the plugin couldn't find scipy because it was not in the ‘C:\Program Files\Quantum GIS Lisboa\apps\Python27\Lib\site-packages’ folder.

I considered installing a separate copy of scipy in ‘C:\Program Files\Quantum GIS Lisboa\apps\Python27\Lib\site-packages’ but backed away from using the scipy Windows installer when it couldn't see the QGIS python installation and didn’t give me the option to install scipy under QGIS.

Work-around: So I went into the ‘C:\Program Files\Quantum GIS Lisboa\apps\Python27\Lib’ folder and found the 'site.py' file. I opened it in a text editor and, right below the import statements, I found the text:

PREFIXES = [sys.prefix, sys.exec_prefix]

and I changed it to read:

PREFIXES = [sys.prefix, sys.exec_prefix, 'C:\Python27\Lib\site-packages']

Now the QGIS python installation is able to find my original scipy module and it seems to be working fine. Presumably, QGIS plugins will be able to take advantage of the many other [python(x,y)] modules I have installed in this directory.

Hope this is useful for others.

share|improve this question

closed as not a real question by Get Spatial, vinayan, R.K., iant, Zachary Mar 25 '13 at 12:45

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Hi, and welcome to GISse. I wanted to let you know I am voting to close this because it isn't actually a question. I do want to put it out there to other users that if there is a question this fits under as an answer, that it perhaps could be migrated. It contains some useful pointers that would be a shame to lose. –  Get Spatial Mar 24 '13 at 22:59
3  
@GetSpatial; maybe he can formulate a question to post his own answer. –  Andre Silva Mar 25 '13 at 0:06
1  
Yeah. That would be more useful. Maybe a grace period for the OP to fix his question before we vote to close it? –  R.K. Mar 25 '13 at 5:17

Browse other questions tagged or ask your own question.