mercredi 25 mars 2015

Running customized script qgis


I want to run a customized script in Qgis (namely that: Ortho Projection produces artifacts).


With export PYTHONPATH=$PYTHONPATH:/PATH_TO_FOLDER I set the pythonpath in the folder where the script is. When I open the python console now in QGis and type import createGlobe I get that message:



Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/http://ift.tt/1yvVSf3", line 478, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named createGlobe


Well, I checked the folder, there is something in there. Even more interestingly, there go a folder and a .pyc document created. enter image description here


When I start the console in my computer and run python in there (not in qgis then) and type in import createGlobe I get a different errromessage:



Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "createGlobe.py", line 8, in <module>
from qgis.core import *
ImportError: No module named qgis.core


Sooo, somehow the python in my console accepts the changed python path while the python in QGis does not. Well, I though I tell python then where to look for qgis.core. I followed these steps here http://ift.tt/1qh1yVv.


After typing export PYTHONPATH=/qgispath/share/qgis/python, starting python again, I do not get this error message ImportError: libqgis_core.so.1.5.0: cannot open shared object file: No such file or directory but the one that There is no module named qgis.core.


Well, I followed the steps further and typed in export LD_LIBRARY_PATH=/qgispath/lib which did not solve the problem. Still no module named qgis.core


Any ideas?!





Aucun commentaire:

Enregistrer un commentaire