无法解析导入“spacy”(reportMissingImports)

2024-05-20 02:31:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我是python新手,在构建良好的工作目录方面没有太多经验。但根据我过去通过pip处理已安装软件包的经验,我没有任何问题

我正在尝试下载、安装和导入spacy。根据我的pip列表,我看到spacy软件包已成功下载。但是当我尝试在MS visual studio代码上创建python文档,在终端中运行代码import spacy时,它说

Import "spacy" could not be resolved Pylance (reportMissingImports).

当我在命令上运行它时,它说:

2021-07-10 15:41:04.164329: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2021-07-10 15:41:04.164530: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
INFO:tensorflow:Enabling eager execution
INFO:tensorflow:Enabling v2 tensorshape
INFO:tensorflow:Enabling resource variables
INFO:tensorflow:Enabling tensor equality
INFO:tensorflow:Enabling control flow v2

我不知道是否有人对正在发生的事情有线索


Tags: pip代码infostreamspacytensorflownot经验