cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2831
Views
25
Helpful
3
Replies

info Python VM failed to start | NSO is not working with Python 3 on MACOS

BasharAziz
Level 1
Level 1

I am trying to reload my nso Services on macos en facing the following error:

 

admin connected from 127.0.0.1 using console on Devleop-iMac.local
admin@ncs# packages reload
reload-result {
package test
result false
info Python VM failed to start
}
admin@ncs#

 

Testing Python3 with NSO, I can not import ncs:

 

develop@develop-iMac ~ % python3
Python 3.9.0 (default, Nov 21 2020, 14:55:42)
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ncs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/develop/nso-5.3.2.1/src/ncs/pyapi/ncs/__init__.py", line 21, in <module>
import _ncs
File "/Users/develop/nso-5.3.2.1/src/ncs/pyapi/_ncs/__init__.py", line 19, in <module>
from ._ncs_py3 import cdb
ImportError: dlopen(/Users/develop/nso-5.3.2.1/src/ncs/pyapi/_ncs/_ncs_py3.abi3.so, 2): Symbol not found: _PyIOBase_Type
Referenced from: /Users/develop/nso-5.3.2.1/src/ncs/pyapi/_ncs/_ncs_py3.abi3.so
Expected in: flat namespace
in /Users/develop/nso-5.3.2.1/src/ncs/pyapi/_ncs/_ncs_py3.abi3.so

 

While in python 2.7 I am able to import ncs:


basharaziz@develop-iMac ~ % python

WARNING: Python 2.7 is not recommended.
This version is included in macOS for compatibility with legacy software.
Future versions of macOS will not include Python 2.7.
Instead, it is recommended that you transition to using 'python3' from within Terminal.

Python 2.7.16 (default, Oct 30 2020, 02:15:49)
[GCC Apple LLVM 12.0.0 (clang-1200.0.30.4) [+internal-os, ptrauth-isa=sign+stri on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>
>>> import ncs
>>>

1 Accepted Solution

Accepted Solutions

lmanor
Cisco Employee
Cisco Employee

I have also experience this problem with python 3.9.

 

I downgraded to python 3.8.6, and successfully loaded my packages..

View solution in original post

3 Replies 3

lmanor
Cisco Employee
Cisco Employee

I have also experience this problem with python 3.9.

 

I downgraded to python 3.8.6, and successfully loaded my packages..

Thanks a lot. Now it works for me after downgrading.

perander
Cisco Employee
Cisco Employee

This is a known issue which is fixed and will be released in the
next maintanince releases.

The fix makes NSO work with Python 3.9.