admin管理员组文章数量:1420145
img_1 Img_2 I'm trying to build an application that will summarize moderately long texts in 60 words or less. But 'flask', 'requests', and 'transformers' are underlined with a wave line. I've tried import the packages but an error keeps popping up.
from flask import Flask, jsonify, request
import requests
from transformers import pipeline
- the error that keeps popping up.
A Import "flask" could not be resolved Pylance (reportMissing|mports) [Ln 1, Col 6]
A Import "requests" could not be resolved from source Pylance (reportMissingModuleSource) [Ln 2, Col 8]
A Import "transformers" could not be resolved Pylance (reportMissinglmports) [Ln 3, Col 6]
img_1 Img_2 I'm trying to build an application that will summarize moderately long texts in 60 words or less. But 'flask', 'requests', and 'transformers' are underlined with a wave line. I've tried import the packages but an error keeps popping up.
from flask import Flask, jsonify, request
import requests
from transformers import pipeline
- the error that keeps popping up.
A Import "flask" could not be resolved Pylance (reportMissing|mports) [Ln 1, Col 6]
A Import "requests" could not be resolved from source Pylance (reportMissingModuleSource) [Ln 2, Col 8]
A Import "transformers" could not be resolved Pylance (reportMissinglmports) [Ln 3, Col 6]
Share
Improve this question
edited Jan 29 at 6:49
Chip Chop
asked Jan 29 at 6:45
Chip ChopChip Chop
11 bronze badge
4
|
1 Answer
Reset to default 0To use the packages you would need to install them. Depending on your setup this can vary. Based on your tags, I am assuming you're pip-installing packages. You need to run the following commands to install the packages:
- pip install Flask (https://pypi./project/Flask/)
- pip install requests (https://pypi./project/requests/)
- pip install transformers (https://pypi./project/transformers/)
Once you install these packages, ideally your errors should be resolved.
本文标签:
版权声明:本文标题:python - I'm trying to import the following but the error log keeps saying (report Missing Imports) - (look at pic) - St 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745308662a2652802.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
pip
, but have you used it? – Tim Roberts Commented Jan 29 at 6:52python
is not found, so the system doesn;t recognize what python is. – Cincinnatus Commented Jan 29 at 9:07