<!doctype html>
<html>
 <head> 
  <meta charset="UTF-8"> 
 </head>
 <body>
  <div class="default-style">
   <div class="default-style">
    Hi,
    <br>
   </div>
   <div class="default-style">
    <br>
   </div>
   <div class="default-style">
    After a fresh install of OSGeo4W network installer, I start QGISD Desktop.  A python error box pops up with the error copied below. I close the error window and the program loads. However, if I click on plugins settings, I receive the error: No Python support detected.
    <br>
   </div>
   <div class="default-style">
    <br>
   </div>
   <div class="default-style">
    I suspect I know the source of the problem. I have installed Python from Anaconda. Anaconda uses an older version of Python and of qt. I modified C:\OSGeo4W\etc\ini\python3.bat by prepending %OSGEO4W_ROOT%\apps\Python39;%OSGEO4W_ROOT%\apps\Python39\Lib;%OSGEO4W_ROOT%\apps\Python39\Lib\site-packages; to PYTHONPATH. There's a curious mix of / and escaped \\ in the resulting path.
    <br>
   </div>
   <div class="default-style">
    <br>
   </div>
   <div class="default-style">
    How do I enable loading python __init__.py when the desktop starts?
    <br>
   </div>
   <div class="default-style">
    Thanks!
    <br>
   </div>
   <div class="default-style">
    <br>
   </div>
   <div class="default-style">
    Error window:
    <br>
   </div>
   <div class="default-style">
    <br>
   </div>
   <div class="default-style">
    Couldn't load SIP module.
    <br>Python support will be disabled.
   </div>
   <div class="default-style">
    <br>Traceback (most recent call last):
    <br>File "", line 1, in 
    <br>File "C:\OSGeo4W/apps/qgis/./python\qgis\__init__.py", line 82, in 
    <br>from qgis.PyQt import QtCore
    <br>File "C:\OSGeo4W/apps/qgis/./python\qgis\PyQt\QtCore.py", line 24, in 
    <br>from PyQt5.QtCore import *
    <br>ImportError: DLL load failed while importing QtCore: The specified procedure could not be found.
   </div>
   <div class="default-style">
    <br>Python version:
    <br>3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
   </div>
   <div class="default-style">
    QGIS version:
    <br>3.20.3-Odense 'Odense', 495fbaec
   </div>
   <div class="default-style">
    Python path:
    <br>['C:/OSGeo4W/apps/qgis/./python', 'C:/Users/Fred/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 'C:/Users/Fred/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins', 'C:/OSGeo4W/apps/qgis/./python/plugins', 'C:\\ProgramData\\Anaconda3', 'C:\\ProgramData\\Anaconda3\\DLLs', 'C:\\ProgramData\\Anaconda3\\lib', 'C:\\ProgramData\\Anaconda3\\lib\\site-packages', 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32', 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32\\lib', 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\Pythonwin', 'C:\\Users\\Fred\\Documents', 'C:\\OSGeo4W\\bin\\python39.zip', 'C:\\OSGeo4W\\apps\\Python39\\DLLs', 'C:\\OSGeo4W\\apps\\Python39\\lib', 'C:\\OSGeo4W\\bin', 'C:\\OSGeo4W\\apps\\Python39', 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages', 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\win32', 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\win32\\lib', 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\Pythonwin']
    <br>OS version: Windows 10 Version 2009
    <br>QGIS version: 3.20.3-Odense 495fbaec
    <br>Qt version: 5.15.2
    <br>Python version: 3.9.5
   </div>
   <div class="default-style">
    Windows 10 Pro
    <br>
   </div>
  </div>
  <div class="io-ox-signature">
   <div class="default-style">
    <br>
   </div>
   <div class="default-style">
    Fred Perloff
   </div>
   <div class="default-style">
    fred@perloff.us
   </div>
  </div>
 </body>
</html>