转换的Python程序的Windows错误3

问题描述 投票:1回答:1

我开始遇到问题,一旦我用Pyinstaller编译python代码,它就开始显示下面粘贴的错误。

任何人都可以建议可能存在的问题,一旦我运行了可执行代码,就会显示一些路径丢失。

Pyinstaller输出:

Users\User\AppData\Local\Continuum\Anaconda2) C:\Users\User>pyinstaller -F --onefile    "C:\Users\User\Desktop\NetworkAutomation\AutowithOptionMenu\optionmenu1.py"

INFO: PyInstaller: 3.2.1
INFO: Python: 2.7.14
INFO: Platform: Windows-7-6.1.7601-SP1
INFO: wrote C:\Users\User\optionmenu1.spec
INFO: UPX is not available.
INFO: Extending PYTHONPATH with paths
\\Users\\User\\Desktop\\NetworkAutomation\\AutowithOptionMenu',
\\Users\\User']
INFO: checking Analysis
INFO: Building because C:\Users\User\Desktop\NetworkAutomation\AutowithOptionMenu\optionmenu1.py changed
INFO: Initializing module dependency graph...
INFO: Initializing module graph hooks...
INFO: running Analysis out00-Analysis.toc
INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable
quired by c:\users\User\appdata\local\continuum\anaconda2\python.exe
INFO: Found C:\Windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4148_none_acd0e4ffe1daef0a.manifest
INFO: Found C:\Windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_acd19a1fe1da248a.manifest
INFO: Searching for assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.4940_none ...
INFO: Found manifest C:\Windows\WinSxS\Manifests\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_08e4299fa83d7e3c.manifest
INFO: Searching for file msvcr90.dll
INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_08e4299fa83d7e3c\msvcr90.dll
INFO: Searching for file msvcp90.dll
INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_08e4299fa83d7e3c\msvcp90.dll
INFO: Searching for file msvcm90.dll
INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_08e4299fa83d7e3c\msvcm90.dll
INFO: Found C:\Windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4148_none_acd0e4ffe1daef0a.manifest
INFO: Found C:\Windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_acd19a1fe1da248a.manifest
INFO: Adding redirect Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 4940)
INFO: Caching module hooks...
INFO: Analyzing C:\Users\User\Desktop\NetworkAutomation\AutowithOptionMenu\optionmenu1.py
 INFO: Processing pre-safe import module hook   _xmlplus
 INFO: Processing pre-safe import module hook   six.moves
0 INFO: Processing pre-find module path hook   distutils
9 INFO: Loading module hooks...
9 INFO: Loading module hook "hook-distutils.py"...
9 INFO: Loading module hook "hook-xml.py"...
3 INFO: Loading module hook "hook-cryptography.py"...
0 INFO: Loading module hook "hook-httplib.py"...
0 INFO: Loading module hook "hook-_tkinter.py"...
0 INFO: checking Tree
2 INFO: checking Tree
3 INFO: Loading module hook "hook-nacl.py"...
9 INFO: Loading module hook "hook-dns.rdata.py"...
2 INFO: Loading module hook "hook-encodings.py"...
5 INFO: Looking for ctypes DLLs
9 INFO: Analyzing run-time hooks ...
9 INFO: Including run-time hook 'pyi_rth__tkinter.py'
6 INFO: Looking for dynamic libraries
6 INFO: Looking for eggs
6 INFO: Using Python library c:\users\User\appdata\local\continuum\anaconda2\python27.dll
6 INFO: Found binding redirects:
dingRedirect(name=u'Microsoft.VC90.CRT', language=None, arch=u'amd64', oldVersion=(9, 0, 21022, 8), newVersion=(9, 0, 30729, 4940), publicKeyToken=u'1fc8b3b9a1e18e3b'
0 INFO: Warnings written to C:\Users\User\build\optionmenu1\warnoptionmenu1.txt
7 INFO: checking PYZ
5 INFO: checking PKG
5 INFO: Building because C:\Users\User\Desktop\NetworkAutomation\AutowithOptionMenu\optionmenu1.py changed
5 INFO: Building PKG (CArchive) out00-PKG.pkg
1 INFO: Redirecting Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 4940)
0 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
6 INFO: Bootloader c:\users\User\appdata\local\continuum\anaconda2\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
6 INFO: checking EXE
8 INFO: Rebuilding out00-EXE.toc because optionmenu1.exe missing
8 INFO: Building EXE from out00-EXE.toc
8 INFO: Appending archive to EXE C:\Users\User\dist\optionmenu1.exe
2 INFO: Building EXE from out00-EXE.toc completed successfully.

一旦我运行可执行文件,我遇到以下错误:

Traceback (most recent call last):
  File "optionmenu1.py", line 7, in <module>
  File "c:\users\fr0047~1\appdata\local\temp\pip-build-4sevzh\pyinstaller\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
  File "site-packages\Pmw\__init__.py", line 28, in <module>
WindowsError: [Error 3] The system cannot find the path specified: 'C:\\Users\\User~1\\AppData\\Local\\Temp\\_MEI97~1\\Pmw/*.*'
Failed to execute script optionmenu1
python tkinter pmw
1个回答
0
投票

为了解决这个问题,只需打开包含脚本的文件夹,然后单击shift +右键单击,然后在此处选择打开命令提示符,它将打开命令提示符,您可以键入pyinstaller,然后键入要编译的脚本名称。

© www.soinside.com 2019 - 2024. All rights reserved.