ImportError: No Module Named¶
If you are using the Job Manager to run a script which “imports” other scripts they must reside in the same folder as the main script or in another directory that is part of the Python path. The paths included by default in the Python path can be printed in a terminal with the command atkpython -c ‘import sys; print(sys.path)’. If ATKPython or QuantumATK are executed from a shortcut, the run location specified in the shortcut is usually included in the Python path as well. Thus, either move the script to be imported to a relevant folder from where it can be imported, or include the directory where the script resides explicitly in the Python path by inserting something like this in your script:
import sys
sys.path.append("c:/my files/scripts")
A simple solution is otherwise to run the script from the command line instead; as long as the script to be imported resides in the same directory as you are running from, it will work fine.