[Qgis-user] Running QGis on a machine with Python 3.11 and PyCharm ?

Zoltan zoltans at geograph.co.za
Fri Jun 9 13:25:12 PDT 2023


Hi,
I seem to remember that pycharm website provides help on using pycharm with qgis, so don't mess with your existing installations of python. 
The gist of it is that you add the pycharm startup to the end of the bat file that qgis provides for setting up all the env variables.
Starting pycharm from the Taskbar will not set these environment for you so use the edited bat file I describe above.
There might also be a way in your pycharm venv to pre set these env vars.
I have a new laptop which I have not yet set up for this but if you are still stuck tomorrow,  I'll set mine up and let you know what works. 
Regards 
Zoltan 


⁣Sent from Blue ​

On 09 Jun 2023, 22:45, at 22:45, Toussaint OTTAVI via QGIS-User <qgis-user at lists.osgeo.org> wrote:
>
>
>Le 09/06/2023 à 18:11, Toussaint OTTAVI via QGIS-User a écrit :
>> If I understand well, I'll have to write a customized startup script,
>
>> with correct path (not pointing to my c:\python\lib) so that QGis can
>
>> start using the included Python interpreter (and not my system-wide 
>> one). But I didn't find how to achieve that.
>
>For now, the only workaround I found to start QGis is to remove 
>completely my system-wide "c:\python" directory.
>Trying to configure path and PYTHONPATH with priority to the QGis
>folder 
>(such as the included .bat files do) does not work. Doing so, and using
>
>SysInternals Process Monitor, we can see it still tries to load things 
>from my "c:\python" directory, and it fails because there are 
>incompatible library versions.
>
>Of course, removing my system-wide Python installation is not an 
>acceptable workaround ;-)
>
>How to force QGis to use only the Python stuff in its folders and 
>sub-folders ? Virtualenv ?
>
>------------------------------------------------------------------------
>
>_______________________________________________
>QGIS-User mailing list
>QGIS-User at lists.osgeo.org
>List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230609/ab6603e0/attachment.htm>


More information about the QGIS-User mailing list