爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 8243|回复: 2

[求助] 安装VScode运行Python,import cinrad报错

[复制链接]

新浪微博达人勋

发表于 2021-11-19 11:39:48 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
本帖最后由 微微一笑 于 2021-11-19 15:22 编辑

--------------------更新-------------------------
本人把VScode卸载,重新安装后,居然解决了问题…
虽然不知道原因,但是解决了很开心!
--------------------------------------------------
由于要处理雷达资料,选择了Python中的cinrad库。
安装Anaconda正常,可以运行Python脚本。
但是安装了VScode后,在其终端运行Python报错,一行行查询后,发现import cinrad就有该报错。
新手,百度查了很多帖子,也没找到原因,是安装中的哪一步有问题?,求指教。
报错信息如下:
>>> import cinrad
G:\Anaconda\lib\site-packages\numpy\__init__.py:143: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under
condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
  from . import _distributor_init
Traceback (most recent call last):
  File "G:\Anaconda\lib\site-packages\numpy\core\__init__.py", line 22, in <module>
    from . import multiarray
  File "G:\Anaconda\lib\site-packages\numpy\core\multiarray.py", line 12, in <module>
    from . import overrides
  File "G:\Anaconda\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: DLL load failed while importing _multiarray_umath: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "G:\Anaconda\lib\site-packages\cinrad\__init__.py", line 1, in <module>
    from . import io
  File "G:\Anaconda\lib\site-packages\cinrad\io\__init__.py", line 4, in <module>
    from cinrad.io.level2 import CinradReader, StandardData
  File "G:\Anaconda\lib\site-packages\cinrad\io\level2.py", line 10, in <module>
    import numpy as np
  File "G:\Anaconda\lib\site-packages\numpy\__init__.py", line 145, in <module>
    from . import core
  File "G:\Anaconda\lib\site-packages\numpy\core\__init__.py", line 48, in <module>
    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:

  * The Python version is: Python3.8 from "G:\Anaconda\python.exe"
  * The NumPy version is: "1.20.1"

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

Original error was: DLL load failed while importing _multiarray_umath: 找不到指定的模块。

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2021-11-19 14:51:01 | 显示全部楼层
Please install mkl-service package, see http://github.com/IntelPython/mkl-service
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2021-11-19 15:21:04 | 显示全部楼层
Lancelot 发表于 2021-11-19 14:51
Please install mkl-service package, see http://github.com/IntelPython/mkl-service

谢谢回复!我刚刚卸载重新安装了VScode,居然解决了问题…困扰我半天~不管怎么样,解决了!
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表