简体   繁体   English

在 Spyder 中按 F5 和 F9 导入 package 的不同行为

[英]Different behavior of package import by F5 and F9 in Spyder

I am using the package cvb in Spyder with Python 3.6.我在 Spyder 中使用 package cvb 和 Python 3.6。

I got import cvb on top of my script我在脚本之上得到了import cvb

If i use F5 to run the whole script I get an error ( AttributeError: module '_cvb' has no attribute 'NotifyArgs ) for this import.如果我使用 F5 运行整个脚本,我会收到此导入的错误( AttributeError: module '_cvb' has no attribute 'NotifyArgs )。

If I select import cvb and then run selction with F9 there is no error and I can run the script afterwards with F5 also without error.如果我 select import cvb然后用 F9 运行 selction 没有错误,我可以在之后用 F5 运行脚本也没有错误。

What is the difference between the call by F5 and F9? F5和F9的调用有什么区别?

I found a solution.我找到了解决方案。 I had to adjust PYTHONPATH and now it works.我不得不调整 PYTHONPATH,现在它可以工作了。

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

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