2

I have a error in console python, I tried using pyqgis without qgis interface.

My problem is when I use: from qgis.core import *

Console's the message is:

from qgis.core import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\OSGeo4W64\apps\qgis\python\qgis\core\__init__.py", line 25, in <module>
    from qgis._core import *
ImportError: DLL load failed: No se encontr¾ el proceso especificado.

my variables are:

Path:

C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\Program Files\dotnet\;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Python27;C:\OSGeo4W64\apps\qgis\bin;C:\OSGeo4W64\apps\Python27\Lib\site-packages\PyQt4;C:\OSGeo4W64\apps\qgis-dev\bin;C:\OSGeo4W64\apps\qgis-ltr\bin;C:\OSGeo4W64\apps\qgis-ltr-dev\bin;C:\OSGeo4W64;C:\OSGeo4W64\bin;
PYTHONPATH: C:\OSGeo4W64\apps\qgis\python;C:\Users\Paola Flores\python-qt5;C:\OSGeo4W64\apps\Python27;C:\OSGeo4W64\apps\Python27\Lib\site-packages;C:\OSGeo4W64\apps\qgis\python\qgis;C:\OSGeo4W64\apps\qgis-ltr\bin;C:\OSGeo4W64\apps\qgis-dev\bin;C:\OSGeo4W64\apps\qgis-ltr-dev\bin;C:\OSGeo4W64;C:\OSGeo4W64\apps\qgis-dev\python;C:\OSGeo4W64\apps\qgis-ltr\python;C:\OSGeo4W64\apps\qgis-dev\;
SMiller
  • 3,706
  • 9
  • 22
Paofc97
  • 31
  • 2

1 Answers1

1

QGIS 3 cannot be used with Python 2.

I've described the whole process in https://anitagraser.com/2019/03/03/stand-alone-pyqgis-scripts-with-osgeo4w/

underdark
  • 84,148
  • 21
  • 231
  • 413