On 04/03/16 11:09, Uwe Fischer wrote:
Hi Michel, hi List,
In addition to my question from yesterday (concerning v.in.ogr in a
Python script), today another item shows up.
I removed the old QGIS from my notebook and installed 2.14 with Grass
7 in order to try that version (following Michels advice). But now I
can't get the script running at all. I get an "import error: no
module named site" message. The same when I just type "python" at the
dos prompt.
I appended the following to the search path (hoping that puts Python
to work), but it did not help:
C:\Program Files\QGIS Essen\apps\Python27; C:\Program Files\QGIS
Essen\apps\Python27\Lib; C:\Program Files\QGIS Essen\bin
I wonder if the reason is that on the notebook, there is no ordinary
Python Installation (Python outside QGIS and GRASS). On my desktop PC
(where the script starts fine but crashes before producing output),
there is an installation under C:\Python27. There, I get no such
error.
Looks like I have no basic understandig for this. So please let me
know: are the Python parts that come with QGIS and GRASS a complete
Python installation?
Complete, but not sytem-wide.
Or do I have to run an additional Python setup
outside QGIS and GRASS to get external scripts running (external
script means: scripts that use GRASS commands from outside a GRASS
session)???
Yes, you have to set PYTHONPATH.
And if the Python parts of QGIS and GRASS are sufficient for my
purpose, how do I have to complete the system setup to get things
running (additional path variables? What the h* is "Pythonpath" for?
PYTHONPATH is a variable that contains the information about where to
find python libraries.
Check this: https://grasswiki.osgeo.org/wiki/GRASS_and_Python#MS-Windows
And how to start IDLE?
AFAIK, IDLE is not installed.
Moritz
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user