0

i have a python script that have "import ncs". This import statement works only if i run the command "source ~/nso-6.1/ncsrc". If i open a shell and i don't run the source command, if i run the python script it says "No module named 'ncs'"

Now, i want to use the VSCode interactive window in order to run the script, but i cannot put the source command, so there is always the same "No module named 'ncs'" error. How can i import ncs without using the source command? How can i start using it?

Thanks

3
  • From the guide for Installation of nso: "Most users add source ~/nso-x.x/ncsrc (where x.x is the NSO version) to their ~/.bash_profile". Have you tried this? Commented Dec 22, 2023 at 15:01
  • That's the problem: i have to do the source command in terminal before running the script (on the same terminal). I would like to run the script that import ncs without running the source command, how can i achieve this? Commented Dec 22, 2023 at 16:29
  • If you add this command to your shell profile as I mentioned in my last comment, it should be automatically executed when the shell initially spawns (without requiring manual intervention to do so). Commented Dec 22, 2023 at 16:30

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.