安装pyspeckit时出现matplotlib错误 [英] matplotlib error while installing pyspeckit

查看:218
本文介绍了安装pyspeckit时出现matplotlib错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当试图下载Pyspeckit(一个天文学程序),我需要得到matplotlib它的工作。当我去尝试安装matplotlib然而,cygwin给我的错误:

While trying to download Pyspeckit (an astronomy program) I needed to get matplotlib for it to work. When I went to try and install matplotlib however, cygwin gave me the error :

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


$ b b

所以我想知道是否有人可能有一个解决方案?我使用python 2.7.3通过Cygwin所以使用安装程序exe wont工作。

So I was wondering if anyone might have a solution to this? I'm using python 2.7.3 through Cygwin so using the installer exe wont work.

如果没有,是否可能指向我的方式来获得类似的东西从cygwin访问的冠层给予canopy或类似的包有matplotlib预安装?

If not, would it be possible to point me in a way to get something like canopy to be accessed from cygwin given canopy or similar packs have matplotlib preinstalled?

感谢您的时间。

推荐答案

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

I had the same problem with matplotlib on Cygwin.

在第821行的lib / matplotlib / tri / _tri.h中定义了一个名为_C的变量,并在第2180行和2186行的tri.cpp中调用。一些原因gcc不喜欢这个(在某些建筑是一个保留字吗?)。我只是在tri.h和tri.cpp中将变量重命名为_Co,并且编译成功完成。

There is a variable called "_C" defined in lib/matplotlib/tri/_tri.h on line 821 and invoked in tri.cpp on lines 2180 and 2186. For some reason gcc doesn't like this (is it a reserved word in some architecture?). I just renamed the variable to "_Co" in both tri.h and tri.cpp, and the compilation finished successfully.

这篇关于安装pyspeckit时出现matplotlib错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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