安装pyspecki时出现matplotlib错误

2024-04-26 00:30:13 发布

您现在位置:Python中文网/ 问答频道 /正文

在尝试下载Pyspeckit(一个天文学程序)时,我需要获取matplotlib才能正常工作。但是,当我尝试安装matplotlib时,cygwin给了我一个错误:

In file included from lib/matplotlib/tri/_tri.cpp:8:0:
lib/matplotlib/tri/_tri.h:821:33: error: expected unqualified-id before numeric constant
lib/matplotlib/tri/_tri.cpp: In constructor ‘RandomNumberGenerator::RandomNumberGenerator(long unsigned int)’:
lib/matplotlib/tri/_tri.cpp:2180:28: error: expected identifier before numeric constant
lib/matplotlib/tri/_tri.cpp:2180:28: error: expected ‘{’ before numeric constant
lib/matplotlib/tri/_tri.cpp: At global scope:
lib/matplotlib/tri/_tri.cpp:2180:28: error: expected unqualified-id before numeric constant
error: command 'gcc' failed with exit status 1

所以我想知道是否有人能解决这个问题?我通过Cygwin使用python2.7.3,所以使用安装程序exe无法工作。在

如果不是的话,有没有可能让我指出一种方法,让类似的东西,从cygwin访问cavernment或类似的包已预装matplotlib?在

谢谢你的时间。在


Tags: inidmatplotlibliberrorcpptriexpected
2条回答

我对Cygwin的matplotlib也有同样的问题。在

在第821行的lib/matplotlib/tri/\u tri.h中定义了一个名为“C”的变量,并在三.cpp在2180和2186号线。出于某些原因,gcc不喜欢这样(在某些架构中这是一个保留字吗?)。我刚刚在tri.h和三.cpp,编译成功完成。在

问题已在以下罚单中处理:

https://github.com/matplotlib/matplotlib/issues/2463

相关问题 更多 >