[QGIS-Developer] Issues with Importing qgis
Ryan Ruggiero
Ryan.Ruggiero at tcevt.com
Wed Oct 17 09:53:53 PDT 2018
Hello Richard, thank you for the response.
I don't have that path in my QGIS install, these are the only folders in the 'share' directory for QGIS3.2:
[cid:image001.png at 01D46617.7D6F3CB0]
What is strange is that I tried importing qgis.core again today just for fun, and I got a different error message:
[cid:image002.png at 01D46617.EAE4C850]
Im guessing this means I need to be running my python program in a python 3.6 shell instead of a python 3.7 shell? But before I uninstall 3.7 and install 3.6 I would like
To see what you make of this error. There isn't much help online with this ImportError regarding QGIS.
Thanks!
-Ryan
-----Original Message-----
From: Richard Duivenvoorde [mailto:rdmailings at duif.net]
Sent: Wednesday, October 17, 2018 4:40 AM
To: Ryan Ruggiero; qgis-developer at lists.osgeo.org
Subject: Re: [QGIS-Developer] Issues with Importing qgis
On 10/16/2018 04:18 PM, Ryan Ruggiero wrote:
> Hello,
>
> I am seeking help regarding importing 'qgis.core' into a standalone
> python script, python executable in cmd, or in a OSGeo4W shell cmd
> executable. I have python 3.7 installed on my machine along with
> OSGeo4W64, QGIS3.2. The current error message I am getting:
>
> Any help with this issue would be greatly appreciated. My goal with this
> is to use qgis geoprocessing tools in the same manner I am able to use
> the arcpy module to geocode. Most of the solutions online suggested
> adding to the PATH and PYTHONPATH user environmental variables, one of
> them being I have tried adding the location of the 'qgis._core.dll'
> file, and I still get the same error.
Hi Ryan,
It is not the dll's that your are missing, but the actual QGIS python stuff.
In your PYTHONPATH you have to point to the in my install avaialbe dir:
<YOURINSTALLATION>/share/qgis/python/
THERE you find the python dirs/modules:
console plugins pyplugin_installer qgis qsci_apis
It should be revealed to you also when you do the following in your
python console:
import sys; print(sys.path)
Hope this helps,
Regards,
Richard Duivenvoorde
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20181017/5cfc8034/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 16353 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20181017/5cfc8034/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 25799 bytes
Desc: image002.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20181017/5cfc8034/attachment-0003.png>
More information about the QGIS-Developer
mailing list