(Feb-20-2020, 06:51 PM)otay Wrote: I would like to work in standalone mode so no internet is connected it will be in private network. is this posiable? How do I down load the library and install in which directory? see below for the error.You install with
pip install junos-eznc
,all is done automatically download and install.It dos install many libraries,here a run with virtual environment.
You can drop virtual environment not required and just install.
C:\code λ python -m venv junos_env C:\code λ cd junos_env\ C:\code\junos_env λ C:\code\junos_env\Scripts\activate (junos_env) C:\code\junos_env λ pip install junos-eznc Collecting junos-eznc Downloading ..... Successfully installed MarkupSafe-1.1.1 ..... # Test that it work. (junos_env) C:\code\junos_env λ python Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from jnpr.junos import Device >>> from jnpr.junos.exception import ConnectError >>> >>> exit() # Libraries it install (junos_env) C:\code\junos_env λ pip list Package Version --------------------- ------- bcrypt 3.1.7 cffi 1.14.0 cryptography 2.8 Jinja2 2.11.1 junos-eznc 2.3.1 lxml 4.5.0 MarkupSafe 1.1.1 ncclient 0.6.7 netaddr 0.7.19 paramiko 2.7.1 pip 18.1 pycparser 2.19 PyNaCl 1.3.0 pyparsing 2.4.6 pyserial 3.4 PyYAML 5.3 scp 0.13.2 setuptools 40.6.2 six 1.14.0 transitions 0.7.2 yamlordereddictloader 0.4.0So as you see it works.
You have one white-space to much.
And probably not install correct as ModuleNotFoundError.
Error:>>> from jnpr.junos import Device # One white-space
File "<stdin>", line 1
from jnpr.junos import Device
^
IndentationError: unexpected indent
>>> ModuleNotFoundError: No module named 'jnpr'