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'
I don't know if this issue still exists for you, but you can perform "pip install git+https://github.com/Juniper/py-junos-eznc.git" as a workaround. There seems to be an issue on the current stable version of junos-eznc for Windows.
This error is due to an import error with the standard Google version of TextFSM when using Windows.
I fixed it by removing my current version of textfsm (pip uninstall text fsm) and installing Kirk Byers version of textfsm that includes the necessary fixes. Make sure to download the branch that includes the fix for windows ->