SeanLee97 / xmnlp

xmnlp:提供中文分词, 词性标注, 命名体识别,情感分析,文本纠错,文本转拼音,文本摘要,偏旁部首,句子表征及文本相似度计算等功能
Apache License 2.0
1.23k stars 188 forks source link

Original error was: PyCapsule_Import could not import module "datetime" #34

Closed atpwolf closed 2 years ago

atpwolf commented 2 years ago

请问一下这是什么问题?放在win7就只能UserWarning: Unsupported Windows version (7). ONNX Runtime supports Windows 10 and above, only. warnings.warn('Unsupported Windows version (%s). ONNX Runtime supports Windows 10 and above, only.' % Lazy load checker...

但放到win10就变成以下这样了。

init.py 22 from . import multiarray

multiarray.py 12 from . import overrides

overrides.py 7 from numpy.core._multiarray_umath import (

ImportError: PyCapsule_Import could not import module "datetime"


xmnlp测试.py 1 import xmnlp

init.py 15 from xmnlp import config

init.py 6 from xmnlp.utils import load_stopword

init.py 12 import numpy as np

init.py 140 from . import core

init.py 48 raise ImportError(msg)

ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help.

Original error was: PyCapsule_Import could not import module "datetime"

SeanLee97 commented 2 years ago

这可能是 onnxruntime 版本的问题,新版本 xmnlp 已经锁定 onnxruntime 的版本,可以重新试一下。如果在 windows 下还不 work 我暂时也没有解决方法,另外 onnxruntime 是微软维护的,按理说 windows 是安装是没问题的