missing module named 'xxx'的内容也太多了,起码>150 行
贴个前 10 的内容:
missing module named 'multiprocessing.forking' - imported by c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_multiprocessing.py (optional)
missing module named multiprocessing.get_context - imported by multiprocessing (top-level), multiprocessing.pool (top-level), multiprocessing.managers (top-level), multiprocessing.sharedctypes (top-level)
missing module named multiprocessing.TimeoutError - imported by multiprocessing (top-level), multiprocessing.pool (top-level)
missing module named multiprocessing.BufferTooShort - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
missing module named multiprocessing.AuthenticationError - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
missing module named multiprocessing.SimpleQueue - imported by multiprocessing (top-level), concurrent.futures.process (top-level)
missing module named 'win32com.gen_py' - imported by win32com (conditional, optional), c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_win32comgenpy.py (top-level)
missing module named pyimod03_importers - imported by PyInstaller.loader.pyimod02_archive (delayed, conditional), c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py (top-level)
missing module named 'com.sun' - imported by pkg_resources._vendor.appdirs (delayed, conditional, optional)
missing module named com - imported by pkg_resources._vendor.appdirs (delayed)
脚本状态下,程序运行没有问题
就拿第一个“'multiprocessing”来说,我手动 pip install multiprocessing 都报错了。。。
ERROR: Command errored out with exit status 1:
command: 'c:\users\administrator\appdata\local\programs\python\python36\python.exe' -c 'import sys, setuptools, to
kenize; sys.argv[0] = '"'"'C:\\Temp\\pip-install-bi2klhf4\\multiprocessing\\setup.py'"'"'; __file__='"'"'C:\\Temp\\pip-
install-bi2klhf4\\multiprocessing\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().repl
ace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-
info
cwd: C:\Temp\pip-install-bi2klhf4\multiprocessing\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Temp\pip-install-bi2klhf4\multiprocessing\setup.py", line 94
print 'Macros:'
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Macros:')?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
很像是 python 版本的问题。。。 但又不能降 python 版本这么折腾。。。
要编译成功,有何办法???
1
littlespider89 2019-10-14 14:50:25 +08:00
你运行的这个程序用到的 multiprocessing 是 python2.7 的,只能用 python2.7,你在 3.6 里用不了
multiprocessing 3.6 都内置了,pip 安装以前的当然装不上 |
2
qazwsxkevin OP @littlespider89 看来没办法了,有几个用到的库,只能在 3.6 以上使用。。。。
|
3
skt041959 2019-10-14 17:07:07 +08:00
我来歪个楼,楼主的用户名“administrator”,怕不是暴露了你还在用 XP 😂?
|
4
Jirajine 2019-10-14 17:23:18 +08:00 via Android
@skt041959 新版 Windows 也一直沿用 administrator 这个用户名啊。。
用这种默认用户名,可以降低终端 prompt,文档作者,配置文件,日志,路径,编译调试信息等各方面暴露个人信息的可能。 |
5
ysc3839 2019-10-14 17:25:40 +08:00
@Jirajine 没记错的话从 Windows 7 开始就会让用户自己创建一个系统账号了,不会直接使用 Administrator。
另外不想暴露个人信息的话你还可以把用户名设成 123 abc 之类的。 |
7
dantelovepizza 2019-10-14 17:28:44 +08:00
你需要 pyinstaller
|
8
Jirajine 2019-10-14 17:31:24 +08:00 via Android
@ysc3839 印象中用 7 的时候还是用的 administrator,可能不是官方安装系统,后来到 10 是引导建一个普通用户,但也可以手动启用 administrator 并登录啊。。
|
9
qazwsxkevin OP |
10
wangyzj 2019-10-14 22:34:26 +08:00
你需要 pyinstaller +1
|
11
renmu 2019-10-15 08:46:25 +08:00 via Android
你需要新建一个干净的虚拟环境,pyinstaller 好像会把所有的包都打包进去
|
12
flynaj 2019-10-15 10:35:33 +08:00 via Android
要彻底解决,只有换 golang
|