You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed pygrib and basemap pip to draw weather maps, but while I was able to import pygrib in Visual Studio Code, the library functions are not working. I tried various methods, including updating and reinstalling, but encountered the following error in the CMD prompt. Please provide multiple solutions considering the possibility that it may not work. The operating system is Windows.
C:\Users\LG_USER>pip3 install pygrib
Collecting pygrib
Using cached pygrib-2.1.5.tar.gz (21.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pyproj in c:\users\lg_user\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from pygrib) (3.5.0)
Requirement already satisfied: setuptools in c:\users\lg_user\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from pygrib) (69.0.2)
Requirement already satisfied: numpy in c:\users\lg_user\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from pygrib) (1.23.1)
Requirement already satisfied: certifi in c:\users\lg_user\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from pyproj->pygrib) (2022.6.15)
Building wheels for collected packages: pygrib
Building wheel for pygrib (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pygrib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
eccodes not found, build may fail...
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\pygrib
copying src\pygrib_init_.py -> build\lib.win-amd64-cpython-310\pygrib
running build_ext
:17: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
C:\Users\LG_USER\AppData\Local\Temp\pip-build-env-ywirx9hh\overlay\Lib\site-packages\Cython\Compiler\Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: C:\Users\LG_USER\AppData\Local\Temp\pip-install-pghb0py2\pygrib_a716c174633648f8ba30a854648e3b40\src\pygrib\_pygrib.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
warning: src\pygrib\_pygrib.pyx:351:12: Unreachable code
Compiling src/pygrib/_pygrib.pyx because it changed.
[1/1] Cythonizing src/pygrib/_pygrib.pyx
building 'pygrib._pygrib' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pygrib
Failed to build pygrib
ERROR: Could not build wheels for pygrib, which is required to install pyproject.toml-based projects
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Select Topic Area
Question
Body
I installed pygrib and basemap pip to draw weather maps, but while I was able to import pygrib in Visual Studio Code, the library functions are not working. I tried various methods, including updating and reinstalling, but encountered the following error in the CMD prompt. Please provide multiple solutions considering the possibility that it may not work. The operating system is Windows.
C:\Users\LG_USER>pip3 install pygrib
Collecting pygrib
Using cached pygrib-2.1.5.tar.gz (21.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pyproj in c:\users\lg_user\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from pygrib) (3.5.0)
Requirement already satisfied: setuptools in c:\users\lg_user\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from pygrib) (69.0.2)
Requirement already satisfied: numpy in c:\users\lg_user\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from pygrib) (1.23.1)
Requirement already satisfied: certifi in c:\users\lg_user\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from pyproj->pygrib) (2022.6.15)
Building wheels for collected packages: pygrib
Building wheel for pygrib (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pygrib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
eccodes not found, build may fail...
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\pygrib
copying src\pygrib_init_.py -> build\lib.win-amd64-cpython-310\pygrib
running build_ext
:17: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pygrib
Failed to build pygrib
ERROR: Could not build wheels for pygrib, which is required to install pyproject.toml-based projects
Beta Was this translation helpful? Give feedback.
All reactions