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_cpython 15.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
certifi conda-forge/noarch::certifi-2023.11.17-pyhd8ed1ab_0
cfitsio conda-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-ubuntu conda-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
geotiff conda-forge/win-64::geotiff-1.7.1-hb4c6682_7
gettext conda-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
gsl conda-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 conda-forge/win-64::icu-70.1-h0e60522_0
idna conda-forge/noarch::idna-3.6-pyhd8ed1ab_0
intel-openmp conda-forge/win-64::intel-openmp-2023.2.0-h57928b3_50497
jinja2 conda-forge/noarch::jinja2-3.1.2-pyhd8ed1ab_1
kealib conda-forge/win-64::kealib-1.5.0-h61be68b_0
krb5 conda-forge/win-64::krb5-1.20.1-heb0366b_0
laz-perf conda-forge/win-64::laz-perf-3.4.0-h91493d7_0
lcms2 conda-forge/win-64::lcms2-2.15-h3e3b177_1
lerc conda-forge/win-64::lerc-4.0.0-h63175ca_0
libaec conda-forge/win-64::libaec-1.1.2-h63175ca_1
libblas conda-forge/win-64::libblas-3.9.0-20_win64_mkl
libcblas conda-forge/win-64::libcblas-3.9.0-20_win64_mkl
libclang conda-forge/win-64::libclang-15.0.7-default_h77d9078_3
libclang13 conda-forge/win-64::libclang13-15.0.7-default_h77d9078_3
libcurl conda-forge/win-64::libcurl-8.1.2-h68f0423_0
libdeflate conda-forge/win-64::libdeflate-1.17-hcfcfb64_0
libexpat conda-forge/win-64::libexpat-2.5.0-h63175ca_1
libgdal conda-forge/win-64::libgdal-3.6.3-h1443b5b_0
libglib conda-forge/win-64::libglib-2.78.1-he8f3873_0
libhwloc conda-forge/win-64::libhwloc-2.9.1-h51c2c0f_0
libiconv conda-forge/win-64::libiconv-1.17-h8ffe710_0
libjpeg-turbo conda-forge/win-64::libjpeg-turbo-2.1.5.1-hcfcfb64_1
libkml conda-forge/win-64::libkml-1.3.0-hd45a9bc_1016
liblapack conda-forge/win-64::liblapack-3.9.0-20_win64_mkl
liblapacke conda-forge/win-64::liblapacke-3.9.0-20_win64_mkl
libnetcdf conda-forge/win-64::libnetcdf-4.9.1-nompi_h83fa41b_102
libogg conda-forge/win-64::libogg-1.3.4-h8ffe710_1
libpng conda-forge/win-64::libpng-1.6.39-h19919ed_0
libpq conda-forge/win-64::libpq-15.3-ha9684e8_0
libprotobuf conda-forge/win-64::libprotobuf-3.21.12-h12be248_2
librttopo conda-forge/win-64::librttopo-1.1.0-he22b5cd_12
libspatialindex conda-forge/win-64::libspatialindex-1.9.3-h39d44d4_4
libspatialite conda-forge/win-64::libspatialite-5.0.1-hfdcade0_23
libsqlite conda-forge/win-64::libsqlite-3.44.2-hcfcfb64_0
libssh2 conda-forge/win-64::libssh2-1.11.0-h7dfc565_0
libtiff conda-forge/win-64::libtiff-4.5.0-hc3b8658_5
libvorbis conda-forge/win-64::libvorbis-1.3.7-h0e60522_0
libwebp conda-forge/win-64::libwebp-1.3.2-hcfcfb64_1
libwebp-base conda-forge/win-64::libwebp-base-1.3.2-hcfcfb64_0
libxml2 conda-forge/win-64::libxml2-2.10.4-hc3477c8_0
libxslt conda-forge/win-64::libxslt-1.1.37-h0192164_0
libzip conda-forge/win-64::libzip-1.10.1-h1d365fa_3
libzlib conda-forge/win-64::libzlib-1.2.13-hcfcfb64_5
lxml conda-forge/win-64::lxml-4.9.2-py310hc0e5b84_0
lz4-c conda-forge/win-64::lz4-c-1.9.4-hcfcfb64_0
m2w64-gcc-libgfor~ conda-forge/win-64::m2w64-gcc-libgfortran-5.3.0-6
m2w64-gcc-libs conda-forge/win-64::m2w64-gcc-libs-5.3.0-7
m2w64-gcc-libs-co~ conda-forge/win-64::m2w64-gcc-libs-core-5.3.0-7
m2w64-gmp conda-forge/win-64::m2w64-gmp-6.1.0-2
m2w64-libwinpthre~
conda-forge/win-64::m2w64-libwinpthread-git-5.0.0.4634.697f757-2
markupsafe conda-forge/win-64::markupsafe-2.1.3-py310h8d17308_1
mkl conda-forge/win-64::mkl-2023.2.0-h6a75c08_50497
mkl-devel conda-forge/win-64::mkl-devel-2023.2.0-h57928b3_50497
mkl-include conda-forge/win-64::mkl-include-2023.2.0-h6a75c08_50497
mock conda-forge/noarch::mock-5.1.0-pyhd8ed1ab_0
msys2-conda-epoch conda-forge/win-64::msys2-conda-epoch-20160418-1
nitro conda-forge/win-64::nitro-2.7.dev8-h1537add_0
nose2 conda-forge/noarch::nose2-0.9.2-py_0
numpy conda-forge/win-64::numpy-1.26.2-py310hf667824_0
openjpeg conda-forge/win-64::openjpeg-2.5.0-ha2aaf27_2
owslib conda-forge/noarch::owslib-0.29.3-pyhd8ed1ab_0
packaging conda-forge/noarch::packaging-23.2-pyhd8ed1ab_0
pcre2 conda-forge/win-64::pcre2-10.40-h17e33f8_0
pdal conda-forge/win-64::pdal-2.5.2-h2d23c47_1
pixman conda-forge/win-64::pixman-0.42.2-h63175ca_0
plotly conda-forge/noarch::plotly-5.18.0-pyhd8ed1ab_0
ply conda-forge/noarch::ply-3.11-py_1
poppler conda-forge/win-64::poppler-23.03.0-h934c637_1
poppler-data conda-forge/noarch::poppler-data-0.4.12-hd8ed1ab_0
postgresql conda-forge/win-64::postgresql-15.3-hd87cd2b_0
proj conda-forge/win-64::proj-9.1.1-heca977f_2
psycopg2 conda-forge/win-64::psycopg2-2.9.6-py310h709a2f1_0
pthreads-win32 conda-forge/win-64::pthreads-win32-2.9.1-hfa6e2cd_3
pygments conda-forge/noarch::pygments-2.17.2-pyhd8ed1ab_0
pyparsing conda-forge/noarch::pyparsing-3.1.1-pyhd8ed1ab_0
pyproj conda-forge/win-64::pyproj-3.5.0-py310hcdd211a_0
pyqt conda-forge/win-64::pyqt-5.15.9-py310h1fd54f2_5
pyqt5-sip conda-forge/win-64::pyqt5-sip-12.12.2-py310h00ffb61_5
pyqtwebkit conda-forge/win-64::pyqtwebkit-5.15.9-py310he49db7d_2
pysocks conda-forge/noarch::pysocks-1.7.1-pyh0701188_6
python-dateutil conda-forge/noarch::python-dateutil-2.8.2-pyhd8ed1ab_0
python_abi conda-forge/win-64::python_abi-3.10-4_cp310
pytz conda-forge/noarch::pytz-2023.3.post1-pyhd8ed1ab_0
pyyaml conda-forge/win-64::pyyaml-6.0.1-py310h8d17308_1
qca conda-forge/win-64::qca-2.3.7-h2624d1c_0
qgis conda-forge/win-64::qgis-3.30.0-py310hc91cd07_0
qjson conda-forge/win-64::qjson-0.9.0-h04a78d6_1009
qscintilla2 conda-forge/win-64::qscintilla2-2.14.1-py310he49db7d_0
qt-main conda-forge/win-64::qt-main-5.15.8-h88fe7eb_7
qtkeychain conda-forge/win-64::qtkeychain-0.13.2-h04a78d6_2
qtwebkit conda-forge/win-64::qtwebkit-5.212-h7c2effe_9
qwt conda-forge/win-64::qwt-6.2.0-h07be427_6
requests conda-forge/noarch::requests-2.31.0-pyhd8ed1ab_0
sip conda-forge/win-64::sip-6.7.12-py310h00ffb61_0
six conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
snappy conda-forge/win-64::snappy-1.1.10-hfb803bf_0
suitesparse conda-forge/win-64::suitesparse-5.4.0-h5d0cbe0_1
tbb conda-forge/win-64::tbb-2021.9.0-h91493d7_0
tenacity conda-forge/noarch::tenacity-8.2.3-pyhd8ed1ab_0
tiledb conda-forge/win-64::tiledb-2.13.2-h3132609_0
toml conda-forge/noarch::toml-0.10.2-pyhd8ed1ab_0
tomli conda-forge/noarch::tomli-2.0.1-pyhd8ed1ab_0
ucrt conda-forge/win-64::ucrt-10.0.22621.0-h57928b3_0
uriparser conda-forge/win-64::uriparser-0.9.7-h1537add_1
urllib3 conda-forge/noarch::urllib3-2.1.0-pyhd8ed1ab_0
vc14_runtime conda-forge/win-64::vc14_runtime-14.36.32532-hdcecf7f_17
win_inet_pton conda-forge/noarch::win_inet_pton-1.1.0-pyhd8ed1ab_6
xerces-c conda-forge/win-64::xerces-c-3.2.4-h63175ca_3
yaml conda-forge/win-64::yaml-0.2.5-h8ffe710_2
zstd conda-forge/win-64::zstd-1.5.5-h12be248_0
The following packages will be UPDATED:
ca-certificates pkgs/main::ca-certificates-2023.08.22~ -->
conda-forge::ca-certificates-2023.11.17-h56e8100_0
openssl pkgs/main::openssl-1.1.1w-h2bbff1b_0 -->
conda-forge::openssl-3.1.4-hcfcfb64_0
vs2015_runtime pkgs/main::vs2015_runtime-14.27.29016~ -->
conda-forge::vs2015_runtime-14.36.32532-h05e6639_17
zlib pkgs/main::zlib-1.2.13-h8cc25b3_0 -->
conda-forge::zlib-1.2.13-hcfcfb64_5
The following packages will be SUPERSEDED by a higher-priority channel:
python pkgs/main::python-3.10.9-h966fe2a_2 -->
conda-forge::python-3.10.9-h4de0772_0_cpython
Proceed ([y]/n)? y
Downloading and Extracting Packages
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(qgis) C:\Users\FFWS>qgis
(qgis) C:\Users\FFWS>python
Python 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:14:58) [MSC
v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import qgis
>>> exit()
(qgis) C:\Users\FFWS>conda activate base
(base) C:\Users\FFWS>conda install conda-build -c conda-forge
Collecting package metadata (current_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
# All requested packages already installed.
(base) C:\Users\FFWS>conda develop
['C:\\Users/FFWS/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\OpenTopography-DEM-Downloader',
'C:/Users/FFWS/anaconda3/envs/qgis/Library/./python',
'C:/Users/FFWS/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python',
'C:/Users/FFWS/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins',
'C:/Users/FFWS/anaconda3/envs/qgis/Library/./python/plugins',
'C:\\Users\\FFWS\\anaconda3\\envs\\qgis\\Library\\python',
'C:\\Users\\FFWS\\anaconda3\\envs\\qgis\\Library\\python\\plugins',
'C:\\Users\\FFWS', 'C:\\Users\\FFWS\\anaconda3\\envs\\qgis\\python310.zip',
'C:\\Users\\FFWS\\anaconda3\\envs\\qgis\\DLLs',
'C:\\Users\\FFWS\\anaconda3\\envs\\qgis\\lib',
'C:\\Users\\FFWS\\anaconda3\\envs\\qgis\\Library\\bin',
'C:\\Users\\FFWS\\anaconda3\\envs\\qgis',
'C:\\Users\\FFWS\\anaconda3\\envs\\qgis\\lib\\site-packages',
'C:/Users/FFWS/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python',
'C:\\Users\\FFWS\\AppData\\Roaming\\QGIS\\QGIS3\\profiles\\default\\python\\plugins\\shapetools\\ext-libs',
'C:/Users/FFWS/Desktop/Boundary_Generation_For_2D/2D Overland Flow
Model-Boundary Generation/2D Overland Flow Model-Boundary Generation/bin/Debug
-n qgis
added
C:\Users\FFWS\['C:\Users\FFWS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\OpenTopography-DEM-Downloader',
completed operation for:
C:\Users\FFWS\['C:\Users\FFWS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\OpenTopography-DEM-Downloader',
added C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\Library\python',
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\Library\python',
added
C:\Users\FFWS\'C:\Users\FFWS\AppData\Roaming\QGIS\QGIS3\profiles\default\python',
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\AppData\Roaming\QGIS\QGIS3\profiles\default\python',
added
C:\Users\FFWS\'C:\Users\FFWS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins',
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins',
added C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\Library\python\plugins',
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\Library\python\plugins',
path exists, skipping
C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\Library\python',
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\Library\python',
path exists, skipping
C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\Library\python\plugins',
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\Library\python\plugins',
added C:\Users\FFWS\'C:\Users\FFWS',
completed operation for: C:\Users\FFWS\'C:\Users\FFWS',
added C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\python310.zip',
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\python310.zip',
added C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\DLLs',
completed operation for: C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\DLLs',
added C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\lib',
completed operation for: C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\lib',
added C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\Library\bin',
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\Library\bin',
added C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis',
completed operation for: C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis',
added C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\lib\site-packages',
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\anaconda3\envs\qgis\lib\site-packages',
path exists, skipping
C:\Users\FFWS\'C:\Users\FFWS\AppData\Roaming\QGIS\QGIS3\profiles\default\python',
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\AppData\Roaming\QGIS\QGIS3\profiles\default\python',
added
C:\Users\FFWS\'C:\Users\FFWS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\shapetools\ext-libs',
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\shapetools\ext-libs',
added C:\Users\FFWS\'C:\Users\FFWS\Desktop\Boundary_Generation_For_2D\2D
completed operation for:
C:\Users\FFWS\'C:\Users\FFWS\Desktop\Boundary_Generation_For_2D\2D
added C:\Users\FFWS\Overland
completed operation for: C:\Users\FFWS\Overland
added C:\Users\FFWS\Flow
completed operation for: C:\Users\FFWS\Flow
added C:\Users\FFWS\Model-Boundary
completed operation for: C:\Users\FFWS\Model-Boundary
added C:\Users\FFWS\Generation\2D
completed operation for: C:\Users\FFWS\Generation\2D
path exists, skipping C:\Users\FFWS\Overland
completed operation for: C:\Users\FFWS\Overland
path exists, skipping C:\Users\FFWS\Flow
completed operation for: C:\Users\FFWS\Flow
path exists, skipping C:\Users\FFWS\Model-Boundary
completed operation for: C:\Users\FFWS\Model-Boundary
added C:\Users\FFWS\Generation\bin\Debug
completed operation for: C:\Users\FFWS\Generation\bin\Debug
(base) C:\Users\FFWS>conda activate qgis
(qgis) C:\Users\FFWS>python
Python 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:14:58) [MSC
v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import qgis
>>>
_______________________________________________
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