简体   繁体   English

PyCharm:尚未解决的参考

[英]PyCharm: Unresolved reference

I am using pycharm and got the following red warnings in my from ... import ... . 我正在使用pycharm,并from ... import ...收到以下红色警告。 But it didn't ask me to install any requirement. 但这并没有要求我安装任何要求。 Why is this happening and how do I get rid of the red thing. 为什么会发生这种情况,以及如何摆脱红色的东西。 Thanks! 谢谢!

在此处输入图片说明

Does the code run? 代码是否运行? If not, you will want to install pyspark and add it to your python environment. 如果没有,您将要安装pyspark并将其添加到您的python环境中。 Otherwise, if the code does run and you simply want to remove the red inspection warning, try adding pyspark to the list of Unresolved references you want it to ignore in File | 否则,如果代码确实运行并且您只是想删除红色检查警告,请尝试将pyspark添加到您希望在文件|文件中忽略的Unresolved references列表中。 Settings | 设置| Inspections - Python - Unresolved references. 检查-Python-未解决的参考。 Taken from reference: Pycharm - Resollving References 摘自参考: Pycharm-解决参考

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

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