09-24-2018 04:40 PM - edited 03-01-2019 04:13 AM
Hello Experts,
I am still exploring NSO and its features, was trying to execute some simple code but getting an error for "import ncs" in Pycharm. It works perfectly in terminal.
NSO - 4.6.1
Ubuntu - 18.04
Pythonpath -
(venv) sagar@sagar-VirtualBox:~/PycharmProjects/Project-NSO2$ echo $PYTHONPATH
/home/ncs461//src/ncs/pyapi/
Is there any way I can point Pycharm to ncs module?
Thank you.
Solved! Go to Solution.
09-25-2018 06:09 AM
I am by no means a PyCharm expert, but I have done this once. In PyCharm you can setup a "Project Interpreter".
There are two ways of handling it, you can either create a virtual environment, and then make sure that the nso libraries are included in it, for instance by soft-linking it. Or, you can go to the plain environment and add loadpaths to that.
In preferences, under Project/project interpreter, I click the gear symbol next to the project interpreter and pick "show all". This gives me a list of project interpreters where I can add new ones. Here you can also edit which loadpaths are used by the interpreter.
09-25-2018 06:09 AM
I am by no means a PyCharm expert, but I have done this once. In PyCharm you can setup a "Project Interpreter".
There are two ways of handling it, you can either create a virtual environment, and then make sure that the nso libraries are included in it, for instance by soft-linking it. Or, you can go to the plain environment and add loadpaths to that.
In preferences, under Project/project interpreter, I click the gear symbol next to the project interpreter and pick "show all". This gives me a list of project interpreters where I can add new ones. Here you can also edit which loadpaths are used by the interpreter.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide