如何在 Windows 上为 Python 安装 Morfeusz2?
How to install Morfeusz2 for Python on Windows?
我正在尝试安装 Morfeusz2 egg for Python 3.7 on Windows, according to the provided user manual(翻译自波兰语):
The Python module can be installed with the easy_install command from the .egg file downloaded from the site (for the appropriate Python version). The .egg file also contains the Morfeusz library with the SGJP dictionary, so you do not need to install other modules under Windows for the use of Morfeusz exclusively from the Python level.
很遗憾,安装失败
python -m easy_install http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py2.7-win32.egg
Downloading http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py2.7-win32.egg
Processing morfeusz2-0.4.0-py2.7-win32.egg
removing 'c:\users\oem\appdata\local\programs\python\python37-32\lib\site-packages\morfeusz2-0.4.0-py2.7-win32.egg' (and everything under it)
creating c:\users\oem\appdata\local\programs\python\python37-32\lib\site-packages\morfeusz2-0.4.0-py2.7-win32.egg
Extracting morfeusz2-0.4.0-py2.7-win32.egg to c:\users\oem\appdata\local\programs\python\python37-32\lib\site-packages
Removing morfeusz2 0.4.0 from easy-install.pth file
Adding morfeusz2 0.4.0 to easy-install.pth file
Installed c:\users\oem\appdata\local\programs\python\python37-32\lib\site-packages\morfeusz2-0.4.0-py2.7-win32.egg
Processing dependencies for morfeusz2==0.4.0
Searching for morfeusz2==0.4.0
Reading https://pypi.python.org/simple/morfeusz2/
Couldn't find index page for 'morfeusz2' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or working download links found for morfeusz2==0.4.0
error: Could not find suitable distribution for Requirement.parse('morfeusz2==0.4.0')
我以为安装错误可以忽略,但看起来mobule只安装了一部分。尝试调用它时:
import morfeusz2
morf = morfeusz2.Morfeusz()
我收到以下错误:
Traceback (most recent call last):
File "D:\Projects-intellij\mysite\ingredients.py", line 4, in <module>
import morfeusz2
File "C:\Users\OEM\AppData\Local\Programs\Python\Python37-32\lib\site-packages\morfeusz2-0.4.0-py2.7-win32.egg\morfeusz2.py", line 28, in <module>
_morfeusz2 = swig_import_helper()
File "C:\Users\OEM\AppData\Local\Programs\Python\Python37-32\lib\site-packages\morfeusz2-0.4.0-py2.7-win32.egg\morfeusz2.py", line 24, in swig_import_helper
_mod = imp.load_module('_morfeusz2', fp, pathname, description)
File "C:\Users\OEM\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\OEM\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: Nie można odnaleźć określonego modułu.
如何诊断和修复根本原因?
在引用的命令中,您使用文件 morfeusz2-0.4.0-py2.7-win32.egg 这对 Python 2.7 (py2.7) 是正确的,但对 3.7 不是。
Python 其他版本的鸡蛋可在此处获得:
http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/
较新的版本将出现在类似的目录中(将 20181014 替换为表示最后一个星期日的字符串)。
我们希望更新下载页面以列出所有可用版本,但尚未完成。
我正在尝试安装 Morfeusz2 egg for Python 3.7 on Windows, according to the provided user manual(翻译自波兰语):
The Python module can be installed with the easy_install command from the .egg file downloaded from the site (for the appropriate Python version). The .egg file also contains the Morfeusz library with the SGJP dictionary, so you do not need to install other modules under Windows for the use of Morfeusz exclusively from the Python level.
很遗憾,安装失败
python -m easy_install http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py2.7-win32.egg
Downloading http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py2.7-win32.egg
Processing morfeusz2-0.4.0-py2.7-win32.egg
removing 'c:\users\oem\appdata\local\programs\python\python37-32\lib\site-packages\morfeusz2-0.4.0-py2.7-win32.egg' (and everything under it)
creating c:\users\oem\appdata\local\programs\python\python37-32\lib\site-packages\morfeusz2-0.4.0-py2.7-win32.egg
Extracting morfeusz2-0.4.0-py2.7-win32.egg to c:\users\oem\appdata\local\programs\python\python37-32\lib\site-packages
Removing morfeusz2 0.4.0 from easy-install.pth file
Adding morfeusz2 0.4.0 to easy-install.pth file
Installed c:\users\oem\appdata\local\programs\python\python37-32\lib\site-packages\morfeusz2-0.4.0-py2.7-win32.egg
Processing dependencies for morfeusz2==0.4.0
Searching for morfeusz2==0.4.0
Reading https://pypi.python.org/simple/morfeusz2/
Couldn't find index page for 'morfeusz2' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or working download links found for morfeusz2==0.4.0
error: Could not find suitable distribution for Requirement.parse('morfeusz2==0.4.0')
我以为安装错误可以忽略,但看起来mobule只安装了一部分。尝试调用它时:
import morfeusz2
morf = morfeusz2.Morfeusz()
我收到以下错误:
Traceback (most recent call last):
File "D:\Projects-intellij\mysite\ingredients.py", line 4, in <module>
import morfeusz2
File "C:\Users\OEM\AppData\Local\Programs\Python\Python37-32\lib\site-packages\morfeusz2-0.4.0-py2.7-win32.egg\morfeusz2.py", line 28, in <module>
_morfeusz2 = swig_import_helper()
File "C:\Users\OEM\AppData\Local\Programs\Python\Python37-32\lib\site-packages\morfeusz2-0.4.0-py2.7-win32.egg\morfeusz2.py", line 24, in swig_import_helper
_mod = imp.load_module('_morfeusz2', fp, pathname, description)
File "C:\Users\OEM\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\OEM\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: Nie można odnaleźć określonego modułu.
如何诊断和修复根本原因?
在引用的命令中,您使用文件 morfeusz2-0.4.0-py2.7-win32.egg 这对 Python 2.7 (py2.7) 是正确的,但对 3.7 不是。
Python 其他版本的鸡蛋可在此处获得: http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/ 较新的版本将出现在类似的目录中(将 20181014 替换为表示最后一个星期日的字符串)。 我们希望更新下载页面以列出所有可用版本,但尚未完成。