简体   繁体   English

Python 库未导入 Pycharm

[英]Python Libraries are not importing into Pycharm

I am using Pycharm and I have the latest versions, I reinstalled everything today.我正在使用 Pycharm 并且我有最新版本,我今天重新安装了所有东西。

I want to install requests and BeautifulSoup and I do it with Pycharm settings and Python Interpreter.我想安装requestsBeautifulSoup ,我用 Pycharm 设置和 Python Interpreter 来安装。 I add them there and click OK.我将它们添加到那里并单击“确定”。 I handle the path and all, but it keeps showing my import is unused or does not exist.我处理了所有路径,但它一直显示我的导入未使用或不存在。

When I type: import requests , it is ok for 1 second, then it goes grey and gives me an error.当我键入: import requests时,1 秒钟没问题,然后它变灰并给我一个错误。 Does anyone have any tips on this?有人对此有任何提示吗?

I have changed the path, done the environment thing and reinstalled twice.我已经更改了路径,完成了环境并重新安装了两次。

It's not an error, it's only a warning.这不是错误,它只是一个警告。 Pycharm is telling you that you have imported a library but you're not using this library (request). Pycharm 告诉你你已经导入了一个库但你没有使用这个库(请求)。 If you use the library the warning disappears如果您使用图书馆警告消失

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM