New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No module named 'fcntl' on windows7 #19
Comments
I do not have access to a window box at the moment (and the Travis CI only builds for Linux and Mac OSX). However, it seems that the library was used by Windows users (but AFAIK of Windows 8+). Maybe (just a guess) on Windows 8+ this issue is solved somehow... This is a non-trivial issue to solve: One needs to use Win32 API instead of fcntl syscalls: If you can contribute the solution to this problem implementing for windows the workaround using the native Win32 API calls, such a pull request is highly welcome. |
The same issue. Suppuse that this problem came with a new update, because I can successfuly use the older version of pymystem3 (replaced code of "mystem.py" from last version to older one). |
can you please write to which exactly older version you replaced the code
of mystem.py?
…On Fri, Nov 17, 2017 at 2:18 PM, Petr Pogorelov ***@***.***> wrote:
The same issue. Suppuse that this problem came with a new update, because
I can successfuly use the last version of pymystem3 (replaced code of
"mystem.py" from last version to older one).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABY6vmlOtv3RpjbCrPxnVJ3TK2oBcuApks5s3YeRgaJpZM4QgC5L>
.
|
i reverted the change which was seemingly caused the problem (i have no windows box, so cannot test it). can you try to install the new version of the package from pip? |
Thanks! But it would be nice to avoid usage python version-specific libraries too (replace ifilter -> filter, imap -> map).
Function "unicode" is also supported only in python2.7, so replacing to "str". Method "iteritems" of "dict" object was replaced to "items" in python3. "basestring" -> "str" And now it is working! PS. Sorry if I do something wrong, I simply clone master branch and run "pip install ." :) |
Hello, which windows version you use?
…On Nov 21, 2017 5:44 AM, "Petr Pogorelov" ***@***.***> wrote:
Thanks! But it would be nice to avoid usage python version-specific
libraries too (replace ifilter -> filter, imap -> map).
>>> import pymystem3 Traceback (most recent call last): File "<stdin>",
line 1, in <module> File "C:\Users\LoadAdmin\Desktop\
pymystem3-master\pymystem3\__init__.py", line 12, in <module> from
.mystem import (Mystem, autoinstall) # noqa File
"C:\Users\LoadAdmin\Desktop\pymystem3-master\pymystem3\mystem.py", line 8
, in <module> from itertools import ifilter, imap ImportError: cannot
import name 'ifilter'
Function "unicode" is also supported only in python2.7.
_NL = unicode('\n').encode('utf-8') NameError: name 'unicode' is not
defined
Method "iteritems" of "dict" object was replaced to "items" in python3.
for k, v in kvs.iteritems(): AttributeError: 'dict' object has no
attribute 'iteritems'
And actually I stuck on this error message:
if isinstance(url, basestring): NameError: name 'basestring' is not defined
PS. Sorry if I do something wrong, I simply cloned master branch and run
"pip install ." :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABY6vgmI6xB2wht_HtDrmWU439UEnN-Oks5s4lUfgaJpZM4QgC5L>
.
|
Win7 |
Can you please write if the same is observed on Windows 8+ or this is Windows 7 specific? |
I was able to install pymstem3 on a Windows 10 machine, running a fresh Python 3.6.3 installation. So maybe this is really Win 7 related. |
Can you also please run the test example from the readme? It is loaded
lazily and the error still may occur on win10.
…On Nov 22, 2017 4:30 PM, "Eugen" ***@***.***> wrote:
I was able to install pymstem3 on a Windows 10 machine, running a fresh
Python 3.6.3 installation. So maybe this is really Win 7 related.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABY6vlJ4Sz6SOJE3McE2MQ2U-h2hkjBeks5s5D4MgaJpZM4QgC5L>
.
|
Seems to work fine, exactly the same output as in the README:
|
great, thanks. that helps a lot to narrow down the issue.
… On 22 Nov 2017, at 16:52, Eugen ***@***.***> wrote:
Seems to work fine, exactly the same output as in the README:
from pymystem3 import Mystem
text = "Красивая мама красиво мыла раму"
m = Mystem()
lemmas = m.lemmatize(text)
print (''.join(lemmas))
красивый мама красиво мыть рама
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#19 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABY6vp4WDoP0ct5qflIU8acQkwsHxs7Eks5s5EMlgaJpZM4QgC5L>.
|
Hello, Due to the lack of a Windows 7 machine and the fact that the issue seems to be Windows 7 specific I cannot deliver a fix. You are however welcome to proivde a pull request which fixes the problems on Windows 7. We may have a separate release / branch / package which supports Windows 7. |
Hello, Sorry, was busy. |
I will close this issue for now. |
pip install pymystem3 (python 3.6.2)
text = 'мама маму' m = Mystem() result = m.lemmatize(text)
error No module named 'fcntl'
The text was updated successfully, but these errors were encountered: