Feb-20-2020, 06:51 PM
I am very new at the python. I am using window 10 version python 3.7.4. I am trying to connect Juniper switch using pyhon script. I am trying use the library called jnpr.junos. What I am confuse about is how python works when I excute from command line "jnpr.junos import Device" how dows it know where to get this lib files from? 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.
Any help I would greatly appricated.
---------------------------
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from jnpr.junos import Device
File "<stdin>", line 1
from jnpr.junos import Device
^
IndentationError: unexpected indent
>>>
>>> ModuleNotFoundError: No module named 'jnpr'
-----------------------------
- Otay
Any help I would greatly appricated.
---------------------------
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from jnpr.junos import Device
File "<stdin>", line 1
from jnpr.junos import Device
^
IndentationError: unexpected indent
>>>
>>> ModuleNotFoundError: No module named 'jnpr'
-----------------------------
- Otay