简体   繁体   English

Pycharm和远程解释器(Docker)显示错误但运行正常

[英]Pycharm and remote interpreter (Docker) shows errors but runs fine

I have set up a remote interpreter which uses a docker image containing anaconda and other packages. 我已经设置了一个远程解释器,该解释器使用包含anaconda和其他软件包的docker映像。 My python project then runs from this interpreter. 然后,我的python项目从该解释器运行。

在此处输入图片说明

The code itself runs perfectly. 代码本身运行完美。 The problem is Pycharm itself doesn't recognise that the packages are installed and believes there should be error, the same also applies for python functions such as min, max and tuple. 问题是Pycharm本身无法识别已安装的软件包,并认为应该存在错误,同样适用于python函数(如min,max和tuple)。 Everything runs fine, however it makes reading the code a nightmare. 一切运行正常,但是这会使阅读代码成为一场噩梦。 (images below) (下图)

在此处输入图片说明 在此处输入图片说明

I'm running on Mac OS X El capitan 10.11.6, Pycharm Pro 2016.2.3 and Docker for Mac 1.12.1 我在Mac OS X El capitan 10.11.6,Pycharm Pro 2016.2.3和Docker for Mac 1.12.1上运行

正如Alex所建议的那样,从“文件”菜单运行“使缓存无效/重新启动”选项可以解决问题。

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

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