PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12.1k stars 2.94k forks source link

[Question]: Spyder5.2.2首次运行加载会报错ImportError: DLL load failed: 找不到指定的程序。再第二次运行加载就不会有问题报出 #5460

Open HelloBroTan opened 1 year ago

HelloBroTan commented 1 year ago

请提出你的问题

windows10 X64 anaconda中创建的虚拟环境中,Spyder5.2.2 + python3.7.12 + paddlepaddle2.3.2 + scipy1.7.3 + [numpy1.21.6+mkl] Traceback (most recent call last): File "d:\pycharm_proj\nlplearning\nlpbase\exam03_bert\chinese_wordsegmentcrf.py", line 90, in import paddlenlp as ppnlp File "D:\anaconda\envs\py37nlppad\lib\site-packages\paddlenlp__init.py", line 22, in from . import metrics File "D:\anaconda\envs\py37nlppad\lib\site-packages\paddlenlp\metrics__init.py", line 16, in from .chunk import ChunkEvaluator File "D:\anaconda\envs\py37nlppad\lib\site-packages\paddlenlp\metrics\chunk.py", line 6, in from seqeval.metrics.sequence_labeling import get_entities File "D:\anaconda\envs\py37nlppad\lib\site-packages\seqeval\metrics__init__.py", line 1, in from seqeval.metrics.sequence_labeling import (accuracy_score, File "D:\anaconda\envs\py37nlppad\lib\site-packages\seqeval\metrics\sequence_labeling.py", line 14, in from seqeval.metrics.v1 import SCORES, _precision_recall_fscore_support File "D:\anaconda\envs\py37nlppad\lib\site-packages\seqeval\metrics\v1.py", line 5, in from sklearn.exceptions import UndefinedMetricWarning File "D:\anaconda\envs\py37nlppad\lib\site-packages\sklearn\init.py", line 82, in from .base import clone File "D:\anaconda\envs\py37nlppad\lib\site-packages\sklearn\base.py", line 17, in from .utils import _IS_32BIT File "D:\anaconda\envs\py37nlppad\lib\site-packages\sklearn\utils\init.py", line 28, in from .fixes import np_version, parse_version File "D:\anaconda\envs\py37nlppad\lib\site-packages\sklearn\utils\fixes.py", line 20, in import scipy.stats File "D:\anaconda\envs\py37nlppad\lib\site-packages\scipy\stats\init.py", line 441, in from .stats import * File "D:\anaconda\envs\py37nlppad\lib\site-packages\scipy\stats\stats.py", line 37, in from scipy.spatial.distance import cdist File "D:\anaconda\envs\py37nlppad\lib\site-packages\scipy\spatial\init__.py", line 101, in from ._procrustes import procrustes File "D:\anaconda\envs\py37nlppad\lib\site-packages\scipy\spatial_procrustes.py", line 9, in from scipy.linalg import orthogonal_procrustes File "D:\anaconda\envs\py37nlppad\lib\site-packages\scipy\linalg\init__.py", line 195, in from .misc import * File "D:\anaconda\envs\py37nlppad\lib\site-packages\scipy\linalg\misc.py", line 4, in from .lapack import get_lapack_funcs File "D:\anaconda\envs\py37nlppad\lib\site-packages\scipy\linalg\lapack.py", line 818, in from scipy.linalg import _flapack ImportError: DLL load failed: 找不到指定的程序。

HelloBroTan commented 1 year ago

import sys import argparse import random import time import math from functools import partial import inspect import numpy as np import collections import pandas as pd from tqdm import tqdm import json

导入paddle库

import paddle.nn.functional as F import paddle.nn as nn from paddle.io import DataLoader from paddle.dataset.common import md5file

导入paddlenlp— spyder第一次启动运行import paddlenlp总提示ImportError: DLL load failed: 找不到指定的程

import paddlenlp as ppnlp