Junos Automation (Scripting)
Junos Automation (Scripting)

PyEz under Windows 10

‎04-19-2020 09:05 AM

I am trying to install PyEz on my Windows 10 laptop. Installing on Ubuntu was straightforward but I've run into a problem under Win10.


Referring to the DO PyEz Cookbook, I installed Python (3.8.2) on my Win10 laptop. I also installed the prerequisites as noted on the Juniper website (ecdsa, pip, pycrypto). Then using <pip install junos-eznc> I get PyEz installed without any apprent error and now have version 2.4.0 in place.


When I attempt to test the installation, I get the error below as it appears the 'fnctl' functions are not available.


Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32
>>> from jnpr.junos import Device

import fcntl
ModuleNotFoundError: No module named 'fcntl'


Is there a solution for Windows platforms? 



Junos Automation (Scripting)

Re: PyEz under Windows 10

‎04-19-2020 07:19 PM
Hi ivor,

Please check out "portalocker" - https://stackoverflow.com/questions/1422368/fcntl-substitute-on-windows

Hope this helps.



If this solves your problem, please mark this post as "Accepted Solution."
Kudos are always appreciated Smiley Happy.