title: How to set up qgis python environment properly
body: <p>I would like to set up a python environment where I can do the following</p>
  
  <ul>
  <li>run the qgis API from outside the qgis application</li>
  <li>be able to install other python libraries using <code>pip</code>, <code>conda</code> or other tools</li>
  </ul>
  
  <p>I tried to follow the solution suggested in the <a href="https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html" rel="nofollow noreferrer">qgis cookbook</a> under "Running custom applications". Basically they recommend to modify the system <code>PATH</code> variable and the <code>PYTHONPATH</code> variable. When I did this however I had a problem similar to many other people (see <a href="https://gis.stackexchange.com/questions/66889/qgis-plugins-dll-load-failed-1-is-not-a-valid-win32-application">here</a>, <a href="https://gis.stackexchange.com/questions/259602/from-qgis-core-import-importerror-dll-load-failed">here</a> and <a href="https://stackoverflow.com/questions/36682677/python-import-error-dll-load-failed-1-is-not-a-valid-win32-application">there</a>).</p>
  
  <p>So then I found out that <code>conda</code> has a <a href="https://anaconda.org/conda-forge/qgis" rel="nofollow noreferrer">dedicated library</a> which I proceeded to install. But this also presents me with an issue... <code>conda list</code> shows <code>qgis</code> as one of the installed libraries, but when i go <code>python</code> then <code>import qgis</code> I get an error <code>ModuleNotFoundError: NoModule named 'qgis'</code></p>
  
  <p>Also I found no instructions in the conda website about this or google, so I'm not sure if this library even really works.</p>
  
  <p>I would like to avoid manually setting windows environment variables and set this one up the proper way. How do I do it?</p>
  
  <p>thanks</p>