ufal / udpipe

UDPipe: Trainable pipeline for tokenizing, tagging, lemmatizing and parsing Universal Treebanks and other CoNLL-U files
Mozilla Public License 2.0
358 stars 75 forks source link

Windows python install #19

Closed kvaleriano closed 7 years ago

kvaleriano commented 7 years ago

Hello,

I have tried to install ufal.udpipe both by trying "pip install ufal.udpipe" and downloading the PyPi package and running the setup and I'm getting C++ errors on install in both cases.

image

Here's an image with the error I'm getting. Any help would be appreciated.

foxik commented 7 years ago

I cannot reproduce the error here, but my guess is that the problem is somehow connected to default locale (because the source file contains utf-8 string literals). Could you please send me the first compilation errors? (I assume the image above shows the last errors; but I need to see where the problem starts.)

kvaleriano commented 7 years ago

Thanks for the quick response, here's a screenshot with the first errors shown:

image

Edit: I've tried changing the system locale from Japanese to English (United States) and only the last 3 errors remain:

image

kvaleriano commented 7 years ago

I went into the code and couldn't figure out at all what was wrong with it so I ended up adding a workaround for it.

image

Notice the "continue;" statement replacing the else, I did the same in a piece of code further below that had the same error and I was finally able to install using setup.py from the downloaded PyPi package.

I've only tried the tests that come with the package but both seem to be working fine.

foxik commented 7 years ago

Thank you very much for your responses, they help to improve UDPipe.

According to the earliest compilation error the locale-problem is really caused by non-ASCII characters in comments -- I will add test to Travis to make sure we use only ASCII characters.

As for the second error - this was already briefly mentioned in another issue. I think the code is in fact valid and VS is reporting false error. What exact version of VS 2015 (notably of cl.exe) do you use? I have cl.exe version 19.00.23026 (that is original VS Community 2015 without any update) and the code compiles fine.

kvaleriano commented 7 years ago

I have cl.exe version 19.00.24215.1 which I believe is Visual Studio 2015 using Update 3

image

foxik commented 7 years ago

Thanks, I am installing Update 3. I will then either release a fix to 1.0 which should compile on VS Update 3 using even Japanese locale, or release 1.1 if that is ready soon enough. Leaving this open until then.

foxik commented 7 years ago

UDPipe 1.1 is out, should be compilable on VS 2015 Update 3 and also in Japanese locale (I did not test that, but the sources contain ASCII characters only now).