gis4wrf icon indicating copy to clipboard operation
gis4wrf copied to clipboard

GIS4WRF installation Error

Open mostamndi opened this issue 10 months ago β€’ 8 comments

I tried to install Gis4WRF on my Ubuntu 22.04, QGIS 3.36 but got the following Error:

Couldn't load plugin 'gis4wrf' due to an error when calling its classFactory() method

RuntimeError: GIS4WRF: Error installing Python packages Log: Added /home/suleiman/.local/share/gis4wrf/python312/lib/python3.12/site-packages as module search path Traceback (most recent call last): File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 35, in init parsed = _parse_requirement(requirement_string) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 64, in parse_requirement return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 82, in _parse_requirement url, specifier, marker = _parse_requirement_details(tokenizer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 126, in _parse_requirement_details marker = _parse_requirement_marker( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 147, in _parse_requirement_marker tokenizer.raise_syntax_error( File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py", line 165, in raise_syntax_error raise ParserSyntaxError( pkg_resources.extern.packaging._tokenizer.ParserSyntaxError: Expected end or semicolon (after name and no valid version specifier) netCDF4>=None ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/init.py", line 39, in bootstrap_with_ui for msg_type, msg_val in bootstrap(): File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/bootstrap.py", line 164, in bootstrap pkg_resources.get_distribution('{}>={}'.format(dep.name, dep.min)) File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/init.py", line 495, in get_distribution dist = Requirement.parse(dist) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/init.py", line 3176, in parse (req,) = parse_requirements(s) ^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/init.py", line 3135, in init super().init(requirement_string) File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 37, in init raise InvalidRequirement(str(e)) from e pkg_resources.extern.packaging.requirements.InvalidRequirement: Expected end or semicolon (after name and no valid version specifier) netCDF4>=None ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/suleiman/miniconda3/envs/qgis/share/qgis/python/qgis/utils.py", line 426, in _startPlugin plugins[packageName] = package.classFactory(iface) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/init.py", line 22, in classFactory bootstrap_with_ui(iface) File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/init.py", line 62, in bootstrap_with_ui raise RuntimeError(PLUGIN_NAME + ': Error installing Python packages\nLog:\n' + log) from e RuntimeError: GIS4WRF: Error installing Python packages Log: Added /home/suleiman/.local/share/gis4wrf/python312/lib/python3.12/site-packages as module search path

Python version: 3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 21:10:00) [GCC 12.3.0] QGIS version: 3.36.1-Maidenhead Maidenhead, exported

Python Path: /home/suleiman/miniconda3/envs/qgis/share/qgis/python /home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python /home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins /home/suleiman/miniconda3/envs/qgis/share/qgis/python/plugins /home/suleiman/miniconda3/envs/qgis/share/qgis/python/plugins /home/suleiman/miniconda3/envs/qgis/share/qgis/python /home/suleiman/apps/mars/lib /home/suleiman /home/suleiman/miniconda3/envs/qgis/lib/python312.zip /home/suleiman/miniconda3/envs/qgis/lib/python3.12 /home/suleiman/miniconda3/envs/qgis/lib/python3.12/lib-dynload /home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages /home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python /home/suleiman/.local/share/gis4wrf/python312/lib/python3.12/site-packages

Could you please help me how to solve this?

Thanks.

Suleiman

mostamndi avatar Apr 14 '24 21:04 mostamndi

after restarting QGis

Couldn't load plugin 'gis4wrf' due to an error when calling its classFactory() method

RuntimeError: GIS4WRF: Error installing Python packages Log: Added /home/suleiman/.local/share/gis4wrf/python312/lib/python3.12/site-packages as module search path Traceback (most recent call last): File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 35, in init parsed = _parse_requirement(requirement_string) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 64, in parse_requirement return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 82, in _parse_requirement url, specifier, marker = _parse_requirement_details(tokenizer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 126, in _parse_requirement_details marker = _parse_requirement_marker( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 147, in _parse_requirement_marker tokenizer.raise_syntax_error( File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py", line 165, in raise_syntax_error raise ParserSyntaxError( pkg_resources.extern.packaging._tokenizer.ParserSyntaxError: Expected end or semicolon (after name and no valid version specifier) netCDF4>=None ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/init.py", line 39, in bootstrap_with_ui for msg_type, msg_val in bootstrap(): File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/bootstrap.py", line 164, in bootstrap pkg_resources.get_distribution('{}>={}'.format(dep.name, dep.min)) File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/init.py", line 495, in get_distribution dist = Requirement.parse(dist) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/init.py", line 3176, in parse (req,) = parse_requirements(s) ^^^^^^ File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/init.py", line 3135, in init super().init(requirement_string) File "/home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 37, in init raise InvalidRequirement(str(e)) from e pkg_resources.extern.packaging.requirements.InvalidRequirement: Expected end or semicolon (after name and no valid version specifier) netCDF4>=None ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/suleiman/miniconda3/envs/qgis/share/qgis/python/qgis/utils.py", line 426, in _startPlugin plugins[packageName] = package.classFactory(iface) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/init.py", line 22, in classFactory bootstrap_with_ui(iface) File "/home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins/gis4wrf/init.py", line 62, in bootstrap_with_ui raise RuntimeError(PLUGIN_NAME + ': Error installing Python packages\nLog:\n' + log) from e RuntimeError: GIS4WRF: Error installing Python packages Log: Added /home/suleiman/.local/share/gis4wrf/python312/lib/python3.12/site-packages as module search path

Python version: 3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 21:10:00) [GCC 12.3.0] QGIS version: 3.36.1-Maidenhead Maidenhead, exported

Python Path: /home/suleiman/miniconda3/envs/qgis/share/qgis/python /home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python /home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python/plugins /home/suleiman/miniconda3/envs/qgis/share/qgis/python/plugins /home/suleiman/miniconda3/envs/qgis/share/qgis/python/plugins /home/suleiman/miniconda3/envs/qgis/share/qgis/python /home/suleiman/apps/mars/lib /home/suleiman/.local/share/gis4wrf/python312/lib/python3.12/site-packages /home/suleiman/miniconda3/envs/qgis/lib/python312.zip /home/suleiman/miniconda3/envs/qgis/lib/python3.12 /home/suleiman/miniconda3/envs/qgis/lib/python3.12/lib-dynload /home/suleiman/miniconda3/envs/qgis/lib/python3.12/site-packages /home/suleiman/.local/share/QGIS/QGIS3/profiles/default/python

mostamndi avatar Apr 14 '24 22:04 mostamndi

@mostamndi How you sorted this error. I am also facing the same error. It will be helpful if you share it.

Shaivishukla avatar Apr 23 '24 05:04 Shaivishukla

Download the repository as zip or clone. Then there is build.py in the folder, run it as 'python3 build.py' and the gis4wrf.zip file will be created. After that, open QGIS -> Plugins -> Manage and Install Plugins -> Install from ZIP -> find your gis4wrf.zip file -> Install Plugin. As a result, you will be able to install successfully.

@mostamndi

bakamotokatas avatar Apr 29 '24 08:04 bakamotokatas

Download the repository as zip or clone. Then there is build.py in the folder, run it as 'python3 build.py' and the gis4wrf.zip file will be created. After that, open QGIS -> Plugins -> Manage and Install Plugins -> Install from ZIP -> find your gis4wrf.zip file -> Install Plugin. As a result, you will be able to install successfully.

@mostamndi

I downloaded build.py file and tried to run it with python as well, but it doesn't seem to work at all, can you be more detailed?

smlie2020 avatar Apr 30 '24 07:04 smlie2020

Download the repository as zip or clone. Then there is build.py in the folder, run it as 'python3 build.py' and the gis4wrf.zip file will be created. After that, open QGIS -> Plugins -> Manage and Install Plugins -> Install from ZIP -> find your gis4wrf.zip file -> Install Plugin. As a result, you will be able to install successfully.

@mostamndi

build.py there are some problems with the code, after the modification, it works normally, thank you very much。 build.zip

smlie2020 avatar Apr 30 '24 07:04 smlie2020

the new link of basemap from geo.py which should be edited: https://tiles.stadiamaps.com/tiles/stamen_terrain_background/{z}/{x}/{y}.png

LreeLenn avatar Apr 30 '24 08:04 LreeLenn

@smlie2020 not just build.py file download whole repo.

bakamotokatas avatar Apr 30 '24 09:04 bakamotokatas

@smlie2020 not just build.py file download whole repo.

yes,It has been installed successfully

smlie2020 avatar Apr 30 '24 11:04 smlie2020