10-08-2018 03:12 AM
Hello ,
Is anyone know how to find path of python-vm which nso used.
I used module ipaddress in python, it worked form my local, but in nso log file it's said there is no module name ipaddress
from nso log file
******************************************************************************************
<INFO> 8-Oct-2018::14:50:49.941 NSOCBA ncs[5858]: Azure-hosted :: import ipaddress
ImportError: No module named ipaddress
from my local
******************************************************************************************
[root@NSO]# python
Python 3.6.3 (default, Jan 4 2018, 16:40:53)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipaddress
>>> exit()
So how to confirm which python vm is used for nso and how to add another module for nso python-vm?
Solved! Go to Solution.
10-08-2018 04:45 AM
You only have to modify ncs-start-python-vm, or better, your own copy of the script. This is described in the development guide in more detail.
Python versions 2.7.5 or higher and Python 3.4 or higher are supported. (This is for 4.7, check your documentation for more details).
10-08-2018 03:28 AM
10-08-2018 04:41 AM
Thanks Vleijon,
And could I know how to change python version in nso?
eg. current nso is used python2. Does it possible to modify startup.py to change nso to use python3
10-08-2018 04:45 AM
You only have to modify ncs-start-python-vm, or better, your own copy of the script. This is described in the development guide in more detail.
Python versions 2.7.5 or higher and Python 3.4 or higher are supported. (This is for 4.7, check your documentation for more details).
10-08-2018 05:23 AM
Hello Vleijon,
It did there, thanks so much!
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