安装pygrib软件包 [英] Installing pygrib Package

查看:126
本文介绍了安装pygrib软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

预先为可能是一个不好/措辞不佳的问题道歉,但我只是涉足编程,对软件包安装的内幕方面等并不熟悉.

Apologies in advance for what is probably a bad/poorly phrased question, but I merely dabble in programming and am very unfamiliar with under the hood aspects of package installation, etc.

基本上,我正在尝试安装pygrib软件包(在此处提供: https://github.com/jswhit/pygrib )通过cygwin终端.

Basically, I am trying to install the pygrib package (available here: https://github.com/jswhit/pygrib) via a cygwin terminal.

我正在Windows 10上运行32位Python 2.7.3.

I am running Python 2.7.3 32-bit on Windows 10.

最初,当我第一次尝试运行"python seteup.py build"并遵循以下建议时,我遇到了丢失的vcvarsall.bat错误:

Originally I encountered the missing vcvarsall.bat error the first time I tried to run 'python seteup.py build' and followed the advice here: error: Unable to find vcvarsall.bat

安装MS Visual Studio程序包后,我已通过该错误解决了该错误,并通过以下输出了解了另一个错误:

After installing the MS Visual Studio package, I have made it past that error and to another I do not understand with the following output:

$ python setup.py build
reading from setup.cfg...running build
running build_py
running build_ext
skipping 'pygrib.c' Cython extension (up-to-date)
building 'pygrib' extension

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Users\Matthew\Anaconda2\lib\site-packages\numpy\core\include -I/usr/local\include -I/usr/local\include -I/usr/local\include/jasper -I/usr/local\include -I/usr\include -I/usr\include -Ig2clib_src -IC:\Users\Matthew\Anaconda2\include -IC:\Users\Matthew\Anaconda2\PC /Tcpygrib.c /Fobuild\temp.win32-2.7\Release\pygrib.obj
pygrib.c
c:\users\matthew\anaconda2\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
pygrib.c(242) : fatal error C1083: Cannot open include file: 'grib_api.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BIN\\cl.exe' failed with exit status 2

很明显,它仍在寻找其他文件,或者需要定义其他环境变量,但是我对如何进行操作感到迷惑,而且在涉及任何这些方面,我都不是专家.

Obviously it's still looking for some other files, or needs other environment variables defined, but I'm at a loss as to how to proceed and I'm far from an expert when it comes to any of this.

如果您有更好的方法来完全完成此过程,我也很乐意尝试完全不同的事情.

I'd also be glad to try something completely different if you have a better way to go about this process entirely.

我尝试过pip和conda安装程序,但也没有运气.

I have tried pip and the conda installer, but have not had any luck with them either.

在此先感谢您提供的任何内容.

Thank you in advance for anything you can offer.

推荐答案

对于python 3,我需要直接使用linux软件包管理器进行安装

for python 3 i needed to install it directly with linux package manager

sudo apt-get install python3-grib

这篇关于安装pygrib软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆