关于Python 3.10在使用百度飞桨 NLP 时import paddlenlp 报错 ModuleNotFoundError: No module named ‘seqeval‘ 的解决办法

这篇具有很好参考价值的文章主要介绍了关于Python 3.10在使用百度飞桨 NLP 时import paddlenlp 报错 ModuleNotFoundError: No module named ‘seqeval‘ 的解决办法。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

版本信息:

Python :            3.10.9  (原打算用3.11.1版本,后来发现飞桨最高支持到3.10版本)

paddlepaddle:   2.4.1

paddlenlp:         2.4.1 (最新版是2.5.0,由于一直报错,降级到2.4.1)

seqeval:            1.2.2

测试过程:

准备学习一下paddlenlp 于是按照官方的说明进行安装,使用官方提供的代码进行测试,测试代码:

 信息抽取
from pprint import pprint
from paddlenlp import Taskflow 
schema = ['时间', '选手', '赛事名称'] # Define the schema for entity extraction 
ie = Taskflow('information_extraction', schema=schema) 
pprint(ie("2月8日上午北京冬奥会自由式滑雪女子大跳台决赛中中国选手谷爱凌以188.25分获得金牌!"))

如果正常执行,应该会输出下面信息:

[{'时间': [{'end': 6,
          'probability': 0.9857378532924486,
          'start': 0,
          'text': '2月8日上午'}],
  '赛事名称': [{'end': 23,
            'probability': 0.8503089953268272,
            'start': 6,
            'text': '北京冬奥会自由式滑雪女子大跳台决赛'}],
  '选手': [{'end': 31,
          'probability': 0.8981548639781138,
          'start': 28,
          'text': '谷爱凌'}]}]

错误信息:

但是事情并灭有很顺利,直接报错了,错误提示信息如下:

E:\pytodo\venv\lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
  File "e:\pytodo\test01.py", line 4, in <module>
    from paddlenlp import Taskflow
  File "E:\pytodo\venv\lib\site-packages\paddlenlp\__init__.py", line 30, in <module>
  File "E:\pytodo\venv\lib\site-packages\paddlenlp\metrics\__init__.py", line 16, in <module>
    from .chunk import ChunkEvaluator
  File "E:\pytodo\venv\lib\site-packages\paddlenlp\metrics\chunk.py", line 20, in <module>
    from seqeval.metrics.sequence_labeling import get_entities
ModuleNotFoundError: No module named 'seqeval'

根据提示,重新手动安装“seqeval”库,pip install seqeval ,安装默认最新版本的1.2.2 ,安装过程很顺利,也没有错误,但是再次运行,还是包同样错误。

查了一下原因,根据github的提示,应该是 seqeval 要安装1.2.1 版本的,于是手动进行安装。 

[已解决]ModuleNotFoundError: No module named 'jieba' or 'seqeval' · Issue #2340 · PaddlePaddle/PaddleNLP (github.com)

然而,pip install seqeval ==1.2.1 进行安装,有报错了……

venv) PS E:\pytodo> pip install seqeval==1.2.1
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/, https://pypi.tuna.tsinghua.edu.cn/simple/, https://pypi.douban.com/simple/, https://mirrors.ustc.edu.cn/pypi/
Collecting seqeval==1.2.1
  Using cached https://pypi.doubanio.com/packages/c4/47/f85f522f1f2532ca650474088e4024a9f52d524379bff058eaadf53cb663/seqeval-1.2.1.tar.gz (43 kB)
  Preparing metadata (setup.py) ... done
Collecting numpy==1.19.2
  Using cached https://pypi.doubanio.com/packages/bf/e8/15aea783ea72e2d4e51e3ec365e8dc4a1a32c9e5eb3a6d695b0d58e67cdd/numpy-1.19.2.zip (7.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [257 lines of output]
      Running from numpy source directory.
      setup.py:470: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
        run_build = parse_setuppy_commands()
      Processing numpy/random\_bounded_integers.pxd.in
      Processing numpy/random\bit_generator.pyx
      Processing numpy/random\mtrand.pyx
      Processing numpy/random\_bounded_integers.pyx.in
      Processing numpy/random\_common.pyx
      Processing numpy/random\_generator.pyx
      Processing numpy/random\_mt19937.pyx
      Processing numpy/random\_pcg64.pyx
      Processing numpy/random\_philox.pyx
      Processing numpy/random\_sfc64.pyx
      Cythonizing sources
      blas_opt_info:
      blas_mkl_info:
      No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
      customize MSVCCompiler
        libraries mkl_rt not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      blis_info:
        libraries blis not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      openblas_info:
        libraries openblas not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
      get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
      customize GnuFCompiler
      Could not locate executable g77
      Could not locate executable f77
      customize IntelVisualFCompiler
      Could not locate executable ifort
      Could not locate executable ifl
      customize AbsoftFCompiler
      Could not locate executable f90
      customize CompaqVisualFCompiler
      Could not locate executable DF
      customize IntelItaniumVisualFCompiler
      Could not locate executable efl
      customize Gnu95FCompiler
      Could not locate executable gfortran
      Could not locate executable f95
      customize G95FCompiler
      Could not locate executable g95
      customize IntelEM64VisualFCompiler
      customize IntelEM64TFCompiler
      Could not locate executable efort
      Could not locate executable efc
      customize PGroupFlangCompiler
      Could not locate executable flang
      don't know how to compile Fortran code on platform 'nt'
        NOT AVAILABLE

      atlas_3_10_blas_threads_info:
      Setting PTATLAS=ATLAS
        libraries tatlas not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      atlas_3_10_blas_info:
        libraries satlas not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      atlas_blas_threads_info:
      Setting PTATLAS=ATLAS
        libraries ptf77blas,ptcblas,atlas not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      atlas_blas_info:
        libraries f77blas,cblas,atlas not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      accelerate_info:
        NOT AVAILABLE

      C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\system_info.py:1914: UserWarning:
          Optimized (vendor) Blas libraries are not found.
          Falls back to netlib Blas library which has worse performance.
          A better performance should be easily gained by switching
          Blas library.
        if self._calc_info(blas):
      blas_info:
        libraries blas not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\system_info.py:1914: UserWarning:
          Blas (http://www.netlib.org/blas/) libraries not found.
          Directories to search for the libraries can be specified in the
          numpy/distutils/site.cfg file (section [blas]) or by setting
          the BLAS environment variable.
        if self._calc_info(blas):
      blas_src_info:
        NOT AVAILABLE

      C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\system_info.py:1914: UserWarning:
          Blas (http://www.netlib.org/blas/) sources not found.
          Directories to search for the sources can be specified in the
          numpy/distutils/site.cfg file (section [blas_src]) or by setting
          the BLAS_SRC environment variable.
        if self._calc_info(blas):
        NOT AVAILABLE

      non-existing path in 'numpy\\distutils': 'site.cfg'
      lapack_opt_info:
      lapack_mkl_info:
        libraries mkl_rt not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      openblas_lapack_info:
        libraries openblas not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      openblas_clapack_info:
        libraries openblas,lapack not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      flame_info:
        libraries flame not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      atlas_3_10_threads_info:
      Setting PTATLAS=ATLAS
        libraries lapack_atlas not found in E:\pytodo\venv\lib
        libraries tatlas,tatlas not found in E:\pytodo\venv\lib
        libraries lapack_atlas not found in C:\
        libraries tatlas,tatlas not found in C:\
      <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
        NOT AVAILABLE

      atlas_3_10_info:
        libraries lapack_atlas not found in E:\pytodo\venv\lib
        libraries satlas,satlas not found in E:\pytodo\venv\lib
        libraries lapack_atlas not found in C:\
        libraries satlas,satlas not found in C:\
      <class 'numpy.distutils.system_info.atlas_3_10_info'>
        NOT AVAILABLE

      atlas_threads_info:
      Setting PTATLAS=ATLAS
        libraries lapack_atlas not found in E:\pytodo\venv\lib
        libraries ptf77blas,ptcblas,atlas not found in E:\pytodo\venv\lib
        libraries lapack_atlas not found in C:\
        libraries ptf77blas,ptcblas,atlas not found in C:\
      <class 'numpy.distutils.system_info.atlas_threads_info'>
        NOT AVAILABLE

      atlas_info:
        libraries lapack_atlas not found in E:\pytodo\venv\lib
        libraries f77blas,cblas,atlas not found in E:\pytodo\venv\lib
        libraries lapack_atlas not found in C:\
        libraries f77blas,cblas,atlas not found in C:\
      <class 'numpy.distutils.system_info.atlas_info'>
        NOT AVAILABLE

      lapack_info:
        libraries lapack not found in ['E:\\pytodo\\venv\\lib', 'C:\\']
        NOT AVAILABLE

      C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\system_info.py:1748: UserWarning:
          Lapack (http://www.netlib.org/lapack/) libraries not found.
          Directories to search for the libraries can be specified in the
          numpy/distutils/site.cfg file (section [lapack]) or by setting
          the LAPACK environment variable.
        return getattr(self, '_calc_info_{}'.format(name))()
      lapack_src_info:
        NOT AVAILABLE

      C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\system_info.py:1748: UserWarning:
          Lapack (http://www.netlib.org/lapack/) sources not found.
          Directories to search for the sources can be specified in the
          numpy/distutils/site.cfg file (section [lapack_src]) or by setting
          the LAPACK_SRC environment variable.
        return getattr(self, '_calc_info_{}'.format(name))()
        NOT AVAILABLE

      numpy_linalg_lapack_lite:
        FOUND:
          language = c
          define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]

      C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\_distutils\dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
        warnings.warn(msg)
      running dist_info
      running build_src
      build_src
      building py_modules sources
      creating build
      creating build\src.win-amd64-3.10
      creating build\src.win-amd64-3.10\numpy
      creating build\src.win-amd64-3.10\numpy\distutils
      building library "npymath" sources
      Traceback (most recent call last):
        File "E:\pytodo\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in <module>
          main()
        File "E:\pytodo\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "E:\pytodo\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 152, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\build_meta.py", line 157, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\build_meta.py", line 248, in run_setup
          super(_BuildMetaLegacyBackend,
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\build_meta.py", line 142, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 499, in <module>
          setup_package()
        File "setup.py", line 491, in setup_package
          setup(**metadata)
        File "C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\core.py", line 169, in setup
          return old_setup(**new_attr)
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\__init__.py", line 165, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
          dist.run_commands()
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
          cmd_obj.run()
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\command\dist_info.py", line 31, in run
          egg_info.run()
        File "C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\command\egg_info.py", line 24, in run
          self.run_command("build_src")
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
          cmd_obj.run()
        File "C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\command\build_src.py", line 144, in run
          self.build_sources()
        File "C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\command\build_src.py", line 155, in build_sources
          self.build_library_sources(*libname_info)
        File "C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\command\build_src.py", line 288, in build_library_sources
          sources = self.generate_sources(sources, (lib_name, build_info))
        File "C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\command\build_src.py", line 378, in generate_sources
          source = func(extension, build_dir)
        File "numpy\core\setup.py", line 650, in get_mathlib_info
          st = config_cmd.try_link('int main(void) { return 0;}')
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\_distutils\command\config.py", line 243, in try_link
          self._link(body, headers, include_dirs,
        File "C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\command\config.py", line 161, in _link
          return self._wrap_method(old_config._link, lang,
        File "C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\command\config.py", line 95, in _wrap_method
          ret = mth(*((self,)+args))
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\_distutils\command\config.py", line 137, in _link
          (src, obj) = self._compile(body, headers, include_dirs, lang)
ls\command\config.py", line 104, in _compile
          src, obj = self._wrap_method(old_config._compile, lang,
        File "C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\command\config.py", line 95, in _wrap_method
          ret = mth(*((self,)+args))
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\_distutils\command\config.py", line 132, in _compile
          self.compiler.compile([src], include_dirs=include_dirs)
        File "C:\Users\admin\AppData\Local\Temp\pip-build-env-0uexikep\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 401, in compile
          self.spawn(args)
          return super().spawn(cmd, env=env)
        File "C:\Users\admin\AppData\Local\Temp\pip-install-_drm9w48\numpy_e4ace71c56d54bf7af156925b951ce98\numpy\distutils\ccompiler.py", line 90, in <lambda>
          m = lambda self, *args, **kw: func(self, *args, **kw)
      TypeError: CCompiler_spawn() got an unexpected keyword argument 'env'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

经过一番查看,应该是1.2.1版本不支持python 3.10 版本,这下蒙了……难道要自己去编译源码?

解决办法:

于是去下载了1.2.1版本的源码回来,正准备编译一下呢,但是反过来一想,源码都有了,还编译啥!直接上源码!

于是把源码文件直接粘贴到site-packages文件夹里,然后再次执行代码……

E:\pytodo\venv\lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
E:\pytodo\venv\lib\site-packages\jieba\_compat.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
  import imp
[2023-01-13 13:59:14,601] [    INFO] - Downloading model_state.pdparams from https://bj.bcebos.com/paddlenlp/taskflow/information_extraction/uie_base_v1.1/model_state.pdparams
100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 450M/450M [10:15<00:00, 766kB/s]
[2023-01-13 14:09:32,557] [    INFO] - Downloading model_config.json from https://bj.bcebos.com/paddlenlp/taskflow/information_extraction/uie_base/model_config.json
100%|████████████████████████████████████████████████████████████████████████████████████████████████████| 377/377 [00:00<00:00, 45.0kB/s]
[2023-01-13 14:09:32,769] [    INFO] - Downloading vocab.txt from https://bj.bcebos.com/paddlenlp/taskflow/information_extraction/uie_base/vocab.txt
100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 182k/182k [00:00<00:00, 543kB/s]
[2023-01-13 14:09:33,294] [    INFO] - Downloading special_tokens_map.json from https://bj.bcebos.com/paddlenlp/taskflow/information_extraction/uie_base/special_tokens_map.json
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 112/112 [00:00<00:00, 112kB/s]
[2023-01-13 14:09:33,446] [    INFO] - Downloading tokenizer_config.json from https://bj.bcebos.com/paddlenlp/taskflow/information_extraction/uie_base/tokenizer_config.json
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 172/172 [00:00<00:00, 172kB/s]
[2023-01-13 14:09:33,632] [    INFO] - loading configuration file C:\Users\fwrx\.paddlenlp\taskflow\information_extraction\uie-base\model_config.json
[2023-01-13 14:09:33,634] [    INFO] - Model config ErnieConfig {
  "architectures": [
    "UIE"
  ],
  "attention_probs_dropout_prob": 0.1,
  "enable_recompute": false,
  "fuse": false,
  "hidden_act": "gelu",
  "hidden_dropout_prob": 0.1,
  "hidden_size": 768,
  "initializer_range": 0.02,
  "intermediate_size": 3072,
  "layer_norm_eps": 1e-12,
  "max_position_embeddings": 2048,
  "model_type": "ernie",
  "num_attention_heads": 12,
  "num_hidden_layers": 12,
  "pad_token_id": 0,
  "paddlenlp_version": null,
  "pool_act": "tanh",
  "task_id": 0,
  "task_type_vocab_size": 3,
  "type_vocab_size": 4,
  "use_task_id": true,
  "vocab_size": 40000
}

[2023-01-13 14:09:33,643] [    INFO] - Configuration saved in C:\Users\fwrx\.paddlenlp\taskflow\information_extraction\uie-base\config.json[2023-01-13 14:09:56,586] [    INFO] - All model checkpoint weights were used when initializing UIE.

[2023-01-13 14:09:56,587] [    INFO] - All the weights of UIE were initialized from the model checkpoint at C:\Users\fwrx\.paddlenlp\taskflow\information_extraction\uie-base.
If your task is similar to the task the model of the checkpoint was trained on, you can already use UIE for predictions without further training.
[2023-01-13 14:09:56,590] [    INFO] - Converting to the inference model cost a little time.
[2023-01-13 14:10:20,229] [    INFO] - The inference model save in the path:C:\Users\fwrx\.paddlenlp\taskflow\information_extraction\uie-base\static\inference
[2023-01-13 14:10:25,183] [    INFO] - We are using <class 'paddlenlp.transformers.ernie.tokenizer.ErnieTokenizer'> to load 'C:\Users\fwrx\.paddlenlp\taskflow\information_extraction\uie-base'.
[{'时间': [{'end': 6,
          'probability': 0.9857378532473966,
          'start': 0,
          'text': '2月8日上午'}],
  '赛事名称': [{'end': 23,
            'probability': 0.8503081103003893,
            'start': 6,
            'text': '北京冬奥会自由式滑雪女子大跳台决赛'}],
  '选手': [{'end': 31,
          'probability': 0.8981535684051067,
          'start': 28,
          'text': '谷爱凌'}]}]

看样子是首次运行代码,有下载了一些模型库等数据。

经过一会的运行之后,结果出来了!

Python 3.10版本可用的源码在这里:Python3.10版本可用的seqeval-1.2.1版本源码-Python文档类资源-CSDN文库文章来源地址https://www.toymoban.com/news/detail-816089.html

到了这里,关于关于Python 3.10在使用百度飞桨 NLP 时import paddlenlp 报错 ModuleNotFoundError: No module named ‘seqeval‘ 的解决办法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 记:一次关于paddlenlp、python、版本之间的兼容性问题

    Python 3.10.8 Python 3.11

    2024年02月09日
    浏览(40)
  • 使用pycharm终端安装百度飞桨paddlepaddle库的方法

    百度飞桨的公开文件非常少,主要靠AIStudio的说明文档,但是该文档没有给出在pycharm上使用的方法,虽然AIStudio提供了免费编程的云资源,甚至也有GPU免费资源,但是经常电脑上是连接不上的。我的建议是用pycharm编写程序,程序没问题时或者AIStudio能够进行程序运行时,再导

    2023年04月10日
    浏览(38)
  • python3.8,3.9,3.10,3.11特性比较

    最近计划将python2迁移到python3,由于本人学习时用的3.7版本,所以仅作大于3.7版本的比较。 文档地址:python3.8 作用:避免重复调用,使代码更加简洁。PS:别当GO写,它不支持声明并赋值变量 作用: 新增了一个函数形参语法 / 用来指明某些函数形参必须使用仅限位置而非关键

    2024年02月05日
    浏览(56)
  • pycharm unsupported Python 3.1报错:pycharm无法识别python 3.10

    本人电脑中的pycharm版本是2019的,在使用python3.10环境的时候,pycharm无法识别,出现如下错误: 网上说是因为python版本过高,无法兼容低版本的pycharm,解决方案分两种:要么降低python环境的版本,取消使用3.10,改用3.7或者3.8之类的版本;要么就是下载高版本的pycharm。这里我

    2024年02月13日
    浏览(38)
  • 卷积神经网络识别人脸项目—使用百度飞桨ai计算

    整个项目需要的准备文件: 下载链接: 链接:https://pan.baidu.com/s/1WEndfi14EhVh-8Vvt62I_w 提取码:7777 链接:https://pan.baidu.com/s/10weqx3r_zbS5gNEq-xGrzg 提取码:7777 1、模型推理文件 2、模型转换文件 数据集的文件夹格式如下图:一共两个文件夹 images文件夹装所有的图片,图片需随机打

    2024年02月16日
    浏览(40)
  • python 3.10安装Box2D遇到的问题及解决办法汇总

    近期在入门强化学习,搭建环境过程遇到很多问题,网上资料比较分散,本人查阅了许多资料才得以解决,将问题与解决方法整理汇总如下。 本人电脑上同时有python3.6和python3.10两个版本,均在同一盘符下,首先尝试直接在pycharm内安装Box2D包,即在pycharm上通过:文件-设置-项

    2024年02月06日
    浏览(78)
  • 构建强大的产品级NLP系统:PaddleNLP Pipelines端到端流水线框架解析

    搜索推荐系统专栏简介:搜索推荐全流程讲解(召回粗排精排重排混排)、系统架构、常见问题、算法项目实战总结、技术细节以及项目实战(含码源) 专栏详细介绍:搜索推荐系统专栏简介:搜索推荐全流程讲解(召回粗排精排重排混排)、系统架构、常见问题、算法项目

    2024年02月04日
    浏览(50)
  • 百度飞桨(PaddlePaddle) - PP-OCRv3 文字检测识别系统 基于 Paddle Serving快速使用(服务化部署 - Docker)

    目录 安装 Docker 安装 PaddleOCR 安装 准备PaddleServing的运行环境, 模型转换 Paddle Serving pipeline部署 重启 测试 百度飞桨(PaddlePaddle) - PP-OCRv3 文字检测识别系统 预测部署简介与总览 百度飞桨(PaddlePaddle) - PP-OCRv3 文字检测识别系统 Paddle Inference 模型推理(离线部署) 百度飞桨(Paddl

    2024年02月07日
    浏览(45)
  • 百度飞桨(PaddlePaddle) - PP-OCRv3 文字检测识别系统 基于 Paddle Serving快速使用(服务化部署 - CentOS 7)

    目录 Paddle Serving服务化部署实战 准备预测数据和部署环境 环境准备 安装 PaddlePaddle 2.0 安装 PaddleOCR 准备PaddleServing的运行环境, 模型转换 Paddle Serving pipeline部署 确认工作目录下文件结构: 启动服务可运行如下命令: 测试 Python发送服务请求: Postman 发送请求 参数调整 百度飞

    2024年02月07日
    浏览(57)
  • 百度飞桨(PaddlePaddle)-数字识别

    手写数字识别任务 用于对 0 ~ 9 的十类数字进行分类,即输入手写数字的图片,可识别出这个图片中的数字。 python -m pip install matplotlib numpy -i https://mirror.baidu.com/pypi/simple python -m pip install paddlepaddle==2.4.2 -i https://pypi.tuna.tsinghua.edu.cn/simple 官网代码少了 plt.show() # 要加上这句,才

    2024年02月03日
    浏览(37)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包