Python程序编译EXE后,在Windows10运行没有报错,在Windows7运行报错,内容如下:
Python path configuration:
PYTHONHOME = 'C:\Users\ADMINI~1\AppData\Local\Temp\_MEI71122'
PYTHONPATH = (not set)
program name = 'C:\Users\Administrator\Desktop\\u81ea\u52a8\u5173\u7535\u5f71.
exe'
isolated = 1
environment = 0
user site = 0
safe_path = 1
import site = 0
is in build tree = 0
stdlib dir = ''
sys._base_executable = 'C:\\Users\\Administrator\\Desktop\\\u81ea\u52a8\u5173\
u7535\u5f71.exe'
sys.base_prefix = 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\_MEI71122'
sys.base_exec_prefix = 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\_MEI71122'
sys.platlibdir = 'DLLs'
sys.executable = 'C:\\Users\\Administrator\\Desktop\\\u81ea\u52a8\u5173\u7535\
u5f71.exe'
sys.prefix = 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\_MEI71122'
sys.exec_prefix = 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\_MEI71122'
sys.path = [
'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\_MEI71122\\base_library.zip',
'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\_MEI71122\\lib-dynload',
'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\_MEI71122',
]
[5192] Failed to start embedded python interpreter!
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
Traceback (most recent call last):
File "<frozen importlib._bootstrap_external>", line 1437, in _path_importer_ca
che
KeyError: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\_MEI71122\\base_library.zi
p'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen zipimport>", line 92, in __init__
KeyError: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\_MEI71122\\base_library.zi
p'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1138, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1078, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1504, in find_spec
File "<frozen importlib._bootstrap_external>", line 1473, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1439, in _path_importer_ca
che
File "<frozen importlib._bootstrap_external>", line 1415, in _path_hooks
File "<frozen zipimport>", line 94, in __init__
File "<frozen zipimport>", line 517, in _read_directory
File "<frozen importlib._bootstrap_external>", line 104, in _path_join
SystemError: Negative size passed to PyUnicode_New
如何解决?谢谢