2

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

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.

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?

Thanks for your time.

1
  • These are just gcc compiler errors so there is probably something in the C++ code that gcc can't understand. Try looking at the lines of code that it says are errors and if you still can't get it, post a question with the C++ tag. Commented Sep 1, 2013 at 16:17

2 Answers 2

3

I had the same problem with matplotlib on Cygwin.

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Did this lead to any loss of functionality or anything?
Or do you mean consistent renaming of all uses? If so, was it only referenced internally to that class?
No loss of functionality. Yes, rename all uses (which are just the three I mentioned). Yes, I believe it's only referenced internally.
0

The issue have been handled in the following ticket:

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.