【发布时间】:2019-03-22 15:45:58
【问题描述】:
根据提供的user manual(翻译自波兰语),我正在尝试在 Windows 上为 Python 3.7 安装 Morfeusz2 egg:
可以使用从网站下载的 .egg 文件中的 easy_install 命令安装 Python 模块(适用于相应的 Python 版本)。 .egg 文件还包含带有 SGJP 字典的 Morfeusz 库,因此您无需在 Windows 下安装其他模块即可仅从 Python 级别使用 Morfeusz。
很遗憾,安装失败
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.
如何诊断和解决根本原因?
【问题讨论】: