2

I recently upgraded to QGIS 3.22

For plugin development I am using PyCharm. after upgrading QGIS to this version PyCharm is not able to read the pyqt, QGIS modules.

I am running PyCharm with the following bat:

bat file:

@echo off
call "%~dp0\o4w_env.bat"
@echo off
path %OSGEO4W_ROOT%\apps\qgis-ltr\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis-ltr
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis-ltr\qtplugins;%OSGEO4W_ROOT%\apps\Qt5\plugins
set PYTHONPATH=%OSGEO4W_ROOT%\apps\qgis-ltr\python;%PYTHONPATH%
set PYCHARM="C:\Users\vs\AppData\Local\JetBrains\PyCharm Community Edition 2022.1.1\bin\pycharm64.exe"
@echo on
start "PyCharm with QGIS knowledge!" /B %PYCHARM% %*

and I've also tried in OSGEO4W shell. It also gives import error 'No module name qgis' so it appears that it has not recognized the 'py3_env' command enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.