Execute python scripts not in a general linux terminal

Hi, there.
I am able to run a python script inside 3D slicer Python consle, by following the suggestion from here:

I am now trying to run the same script in a normal Linux terminal, however, since slicer is a package that does not exist outside of the 3D slicer install environment, always some errors are reported.

I also tried doing such: ./Slicer --no-splash --no-main-window --python-script “MY_PYTHON” – this works somehow but still report some warning like below:

qSlicerMarkupsModulePrivate::addToolBar: no main window is available, toolbar is not added
qSlicerSequencesModulePrivate::addToolBar: no main window is available, toolbar is not added
Error ImageIO factory did not return an ImageIOBase: MRMLIDImageIO

Is there a way that I can run the Python script in a nominal Linux terminal?

I don’t know why --but I can not modify my post now… actually just found the title is wrong-- it should be “Execute Python scripts in a generic Linux terminal”