我做了转换到exe后,SSH(的paramiko)功能不工作了。它没有连接到设备。 我已经包括的paramiko和插座包。任何想法?
它与非变频形式工作英寸
setup.py文件
import cx_Freeze
from cx_Freeze import setup, Executable
import os
import sys
includes = []
include_files = ["C:\\Python36-32\DLLs\\tcl86t.dll",
"C:\\Python36-32\DLLs\\tk86t.dll",
"C:\\Gustavo\\PyCharmPortable\\new\\cpass.ico",
"C:\\Gustavo\\PyCharmPortable\\new\\py2.py",
"C:\\Gustavo\\PyCharmPortable\\new\\py3.py",
"C:\\Gustavo\\PyCharmPortable\\new\\tn.py",
"C:\\Gustavo\\PyCharmPortable\\new\\file1.csv"]
PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
os.environ['TCL_LIBRARY'] = "C:\\Python36-32\\tcl\\tcl8.6"
os.environ['TK_LIBRARY'] = "C:\\Python36-32\\tcl\\tk8.6"
base = 'Win32GUI' if sys.platform == 'win32' else None
setup(name='Password Change', version='0.1', description='Password Change',
options={"build_exe": {"packages": ["tkinter","paramiko","PIL","socket","telnetlib"], "includes": includes, "include_files": include_files}},
executables=[Executable('cp.py', base=base)])
尝试包括socket.py/socketserver.py和_multiprocessing.pyd / _tkinter.pyd / _socket.pyd,这是为我工作。
include_files = [
"C:\\Python36-32\DLLs\\tcl86t.dll",
"C:\\Python36-32\DLLs\\tk86t.dll",
"Python36/Lib/socket.py",
"Python36/Lib/socketserver.py",
"Python36/DLLs/_multiprocessing.pyd",
"Python36/DLLs/_tkinter.pyd",
"Python36/DLLs/_socket.pyd",
"C:\\Gustavo\\PyCharmPortable\\new\\cpass.ico",
"C:\\Gustavo\\PyCharmPortable\\new\\py2.py",
"C:\\Gustavo\\PyCharmPortable\\new\\py3.py",
"C:\\Gustavo\\PyCharmPortable\\new\\tn.py",
"C:\\Gustavo\\PyCharmPortable\\new\\file1.csv",