Re: [Qgis-user] PyQGIS Jupyter Notebooks on Windows Using Conda
Hi Noshin Saiyara, you need to launch the Jupyter Notebook using the same environment. For example: $ conda activate qgis $ jupyter-notebook (or what your executable is called, maybe it's jupyter-lab) Cheers, Hannes On 04.12.23 07:50, noshin prachi via QGIS-User wrote: Dear all, I am trying to create a conda environment with qgis which will be ready to be used in a Jupyter notebook. I have added all the steps that I have followed in the attachment named steps. I have copied path from qgis which is being opened from the conda environment. But when I am trying to use fromqgis.coreimportQgsApplication,QgsVectorLayer,QgsProcessingFeedback - I am getting an error message that the qgis module does not exist. I am using windows 10, python 3.10.9, qgis 3.30. Please help me in this regard Best regards, Noshin Saiyara ___ QGIS-User mailing list QGIS-User@lists.osgeo.org List info:https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user -- Johannes Kröger / GIS-Entwickler/-Berater - Aufwind durch Wissen! Web-Seminare und Online-Schulungen bei derwww.foss-academy.com - WhereGroup GmbH c/o KK03 GmbH Lange Reihe 29 20099 Hamburg Germany Tel: +49 (0)228 / 90 90 38 - 36 Fax: +49 (0)228 / 90 90 38 - 11 johannes.kroe...@wheregroup.com www.wheregroup.com Geschäftsführer: Olaf Knopp, Peter Stamm Amtsgericht Bonn, HRB 9885 --- ___ QGIS-User mailing list QGIS-User@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] PyQGIS Jupyter Notebooks on Windows Using Conda
Dear all, I am trying to create a conda environment with qgis which will be ready to be used in a Jupyter notebook. I have added all the steps that I have followed in the attachment named steps. I have copied path from qgis which is being opened from the conda environment. But when I am trying to use from qgis.core import QgsApplication, QgsVectorLayer, QgsProcessingFeedback - I am getting an error message that the qgis module does not exist. I am using windows 10, python 3.10.9, qgis 3.30. Please help me in this regard Best regards, Noshin Saiyara (base) C:\Users\FFWS>conda create -n qgis python=3.10.9 WARNING: A conda environment already exists at 'C:\Users\FFWS\anaconda3\envs\qgis' Remove existing environment (y/[n])? n CondaSystemExit: Exiting. (base) C:\Users\FFWS>conda activate qgis (qgis) C:\Users\FFWS>python Python 3.10.9 | packaged by Anaconda, Inc. | (main, Mar 8 2023, 10:42:25) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> exit() (qgis) C:\Users\FFWS>conda install -c conda-forge qgis=3.30.0 Collecting package metadata (current_repodata.json): done Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: done ==> WARNING: A newer version of conda exists. <== current version: 23.5.0 latest version: 23.10.0 Please update conda by running $ conda update -n base -c defaults conda Or to minimize the number of packages updated during conda update use conda install conda=23.10.0 ## Package Plan ## environment location: C:\Users\FFWS\anaconda3\envs\qgis added / updated specs: - qgis=3.30.0 The following packages will be downloaded: package|build ---|- python-3.10.9 |h4de0772_0_cpython15.1 MB conda-forge python_abi-3.10| 4_cp310 7 KB conda-forge Total:15.2 MB The following NEW packages will be INSTALLED: blas conda-forge/win-64::blas-2.120-mkl blas-devel conda-forge/win-64::blas-devel-3.9.0-20_win64_mkl blosc conda-forge/win-64::blosc-1.21.5-hdccc3a2_0 boost-cpp conda-forge/win-64::boost-cpp-1.78.0-h9f4b32c_4 brotli-python conda-forge/win-64::brotli-python-1.1.0-py310h00ffb61_1 cairo conda-forge/win-64::cairo-1.16.0-hd694305_1014 ceres-solver conda-forge/win-64::ceres-solver-2.1.0-h45bfb9c_2 certificonda-forge/noarch::certifi-2023.11.17-pyhd8ed1ab_0 cfitsioconda-forge/win-64::cfitsio-4.2.0-h9ebe7e4_0 charset-normalizer conda-forge/noarch::charset-normalizer-3.3.2-pyhd8ed1ab_0 coverage conda-forge/win-64::coverage-7.3.2-py310h8d17308_0 curl conda-forge/win-64::curl-8.1.2-h68f0423_0 draco conda-forge/win-64::draco-1.5.6-h181d51b_0 eigen conda-forge/win-64::eigen-3.4.0-h91493d7_0 exiv2 conda-forge/win-64::exiv2-0.27.6-hadc2d18_1 expat conda-forge/win-64::expat-2.5.0-h63175ca_1 font-ttf-dejavu-s~ conda-forge/noarch::font-ttf-dejavu-sans-mono-2.37-hab24e00_0 font-ttf-inconsol~ conda-forge/noarch::font-ttf-inconsolata-3.000-h77eed37_0 font-ttf-source-c~ conda-forge/noarch::font-ttf-source-code-pro-2.038-h77eed37_0 font-ttf-ubuntuconda-forge/noarch::font-ttf-ubuntu-0.83-h77eed37_1 fontconfig conda-forge/win-64::fontconfig-2.14.2-hbde0cde_0 fonts-conda-ecosy~ conda-forge/noarch::fonts-conda-ecosystem-1-0 fonts-conda-forge conda-forge/noarch::fonts-conda-forge-1-0 freetype conda-forge/win-64::freetype-2.12.1-hdaf720e_2 freexl conda-forge/win-64::freexl-1.0.6-h67ca5e6_1 future conda-forge/noarch::future-0.18.3-pyhd8ed1ab_0 gdal conda-forge/win-64::gdal-3.6.3-py310h644bc08_0 geos conda-forge/win-64::geos-3.11.1-h1537add_0 geotiffconda-forge/win-64::geotiff-1.7.1-hb4c6682_7 gettextconda-forge/win-64::gettext-0.21.1-h5728263_0 gflags conda-forge/win-64::gflags-2.2.2-ha925a31_1004 glib conda-forge/win-64::glib-2.78.1-h12be248_0 glib-tools conda-forge/win-64::glib-tools-2.78.1-h12be248_0 glog conda-forge/win-64::glog-0.6.0-h4797de2_0 gslconda-forge/win-64::gsl-2.7-hdfb1a43_0 gst-plugins-base conda-forge/win-64::gst-plugins-base-1.22.7-h001b923_0 gstreamer conda-forge/win-64::gstreamer-1.22.7-hb4038d2_0 hdf4 conda-forge/win-64::hdf4-4.2.15-h1334946_6 hdf5 conda-forge/win-64::hdf5-1.12.2-nompi_h57737ce_101 httplib2 conda-forge/noarch::httplib2-0.22.0-pyhd8ed1ab_0 icu