I made a simple program by using Python to access CISCO devices. I am using the Netmiko Textfsm method for this. When I build an .exe using pyinstaller it works fine. However, if I copy the .exe to another PC, it shows an error:
Directory containing TextFSM index file not found.
Please set the NET_TEXTFSM environment variable to point at the directory containing your TextFSM index file.
Alternatively,
pip install ntc-templates(if using ntc-templates).
How can I overcome this problem?
The issue is you need to use an absolute path and not a relative path here:
os.path.join should use the absolute path as follows because relative paths are not supported here: