[Qgis-user] Error of import qgis.core in PyCharme or PyScripter

Marc Yeranosyan marc.yeranosyan at gmail.com
Wed Dec 16 01:25:59 PST 2020


Hi liste,

I always had a problem with the integration of PyQgis libraries in
PyScripter et PyCharme.
My lunch *PyCharme.bat* file to execute is:
@echo off
call "C:\Program Files\QGIS 3.16"\bin\o4w_env.bat
call "C:\Program Files\QGIS 3.16"\apps\grass\grass78\etc\env.bat
@echo off
path %PATH%;C:\Program Files\QGIS 3.16\apps\qgis\bin
path %PATH%;C:\Program Files\QGIS 3.16\apps\grass\grass78\lib
path %PATH%;C:\Program Files\QGIS 3.16\apps\Qt5\bin
path %PATH%;C:\Program Files\QGIS 3.16\apps\Python37\Scripts
set PYTHONPATH=%PYTHONPATH%;C:\Program Files\QGIS 3.16\apps\qgis\python
set PYTHONPATH=%PYTHONPATH%;C:\Program Files\QGIS
3.16\apps\Python37\lib\site-packages
set QGIS_PREFIX_PATH=C:\Program Files\QGIS 3.16\apps\qgis
set PYTHONHOME=C:\Program Files\QGIS 3.16\apps\Python37
set PATH C:\Program Files\JetBrains\PyCharm Community Edition
2020.3\bin;%PATH%
start "PyCharm aware of Quantum GIS" /B "C:\Program Files\JetBrains\PyCharm
Community Edition 2020.3\bin\pycharm64.exe"%*

But I have the same error while calling qgis.core or qgis._core. The image
is below.


















*Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit
(AMD64)] on win32import qgisimport qgis._coreTraceback (most recent call
last):  File "<input>", line 1, in <module>  File "C:\Program
Files\JetBrains\PyCharm Community Edition
2020.3\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_import_hook.py",
line 21, in do_import    module = self._system_import(name, *args,
**kwargs)ImportError: DLL load failed: La procédure spécifiée est
introuvable.import qgis.coreTraceback (most recent call last):  File
"<input>", line 1, in <module>  File "C:\Program Files\JetBrains\PyCharm
Community Edition
2020.3\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_import_hook.py",
line 21, in do_import    module = self._system_import(name, *args,
**kwargs)  File "C:\Program Files\QGIS
3.16\apps\qgis\python\qgis\core\__init__.py", line 25, in <module>    from
qgis._core import *  File "C:\Program Files\JetBrains\PyCharm Community
Edition
2020.3\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_import_hook.py",
line 21, in do_import    module = self._system_import(name, *args,
**kwargs)ImportError: DLL load failed: La procédure spécifiée est
introuvable.*

PyCharm et PyScripter has the same results outputs.
Could it be the reason for using *Windows 10 Pro* in place of *Windows
Famillie*?
Thank you in advance
Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201216/54a08a21/attachment.html>


More information about the Qgis-user mailing list