Search code examples
pythonimportspyderattributeerror

Different behavior of package import by F5 and F9 in Spyder


I am using the package cvb in Spyder with Python 3.6.

I got import cvb on top of my script

If i use F5 to run the whole script I get an error (AttributeError: module '_cvb' has no attribute 'NotifyArgs) for this import.

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.

What is the difference between the call by F5 and F9?


Solution

  • I found a solution. I had to adjust PYTHONPATH and now it works.