QGIS Intallation with OSGeo4W

From Tuflow
Jump to navigation Jump to search

Installation Steps

  1. Download OSGeo4W setup installer
    https://qgis.org/en/site/forusers/download.html
  2. Run the downloaded EXE
  3. Select Advanced Install
    Osgeo4w installation 1.PNG
  4. Select Install from Internet
    Osgeo4w installation 2.PNG
  5. Select a directory and other installation options (Note some options may require admininstrator rights)
    Osgeo4w installation 3.PNG
  6. Click Next
    Osgeo4w installation 4.PNG
  7. Select Direct Connection (Note some firewall systems will require proxy settings)
    Osgeo4w installation 5.PNG
  8. Select a download site. It is recommended to use with one with an SSL certificate (i.e. starts with https://)
    Osgeo4w installation 6.PNG
  9. Use the search bar to search for "QGIS". Expand the Desktop dropdown and find "qgis: QGIS Desktop" under the package column. Left-click the "skip" text and the text will change to the latest version number. Once the verseion number is showing, this will be the version installed when you proceed. If you left-click again, the version number may change again to the previous version. If you keep left-clicking it will cycle back to "skip". (Note: you could also choose the "qgis-ltr: QGIS Desktop (long term release)" instead, and this would install the long term release version).
    Osgeo4w installation 7.PNG
  10. The installation also requires manually choosing several Python libraries. Use the search bar again and search for "scipy". Expand the Libs dropdown and find "python3-scipy". Left-click the "skip" text once to choose the latest scipy library version.
    Osgeo4w installation 8.PNG
  11. The following python libraries should be added:
    • scipy
    • matplotlib
    • netcdf4
    • pandas
    • pyarrow
    • fiona
    • geopandas
    • rtree
    • shapely
  12. Click Next
  13. Continue to work through the steps of the installation process - the installer will ask you to also install a number of dependencies (make sure to click yes to these) and prompt for license agreements
  14. Once installed, QGIS should be installed in the location specified in an earlier step



Upgrading Steps

  1. As part of the installation, OSGeo4W should install a program called "setup" which you can search in the Windows start bar. You can also run the downloaded OSGeo4W installer again (they are the same).
  2. Once running the setup, simply continue clicking Next. The setup should remember all your previous settings and automatically choose the latest version of the installed libraries at the Packages Selection stage of the installation


Upgrading Silently

It's possible to upgrade silently from the Windows CMD prompt or from a batch file.

From CMD

  1. Search "osgeo4w" in the Windows start bar and choose OSGeo4W Shell
  2. Type the following command and press enter
    setup -q -g
    "-q" : quiet installation flag
    "-g" : upgrade installed packages flag


From BAT

  1. In the OSGeo4W installation folder under the "bin" folder find the following batch file "o4w_env.bat" (e.g. "C:\OSGeo4W\bin\o4w_env.bat").
  2. In your batch file call the "o4w_env.bat" file
  3. On the next line, type "setup -q -g"
    "-q" : quiet installation flag
    "-g" : upgrade installed packages flag
  4. Your final batch file should look like the below with the path to "o4w_env.bat" customised to match your installation
    call C:\OSGeo4W\bin\o4w_env.bat
    setup -q -g
    
  5. Run the batch file



Up
Go-up.png Back to QGIS Tips page