简体   繁体   English

创建exe后没有名为pyperclip的模块

[英]no module named pyperclip after exe has been created

The script I'm running works great on .py and also if i run it as .exe from the python file. 我正在运行的脚本在.py也可以很好地工作,如果我从python文件中以.exe运行它,也可以很好地工作。
but when i export it to one stand alone exe file i get the error in the pic. 但是,当我将其导出到一个独立的exe文件时,我在图片中得到错误。 i tried already py2exe + Pyinstaller + "hidden" (option) + DLLs have been copied to the directory. 我已经尝试过py2exe + Pyinstaller + "hidden" (option) + DLLs已复制到目录中。
the issue seems to be the "Pyperclip module" after the compilation has been made. 编译完成后,问题似乎出在“ Pyperclip模块”上。

I'm working on WIN 8.1 with Python 2.7 我正在使用python 2.7的 WIN 8.1
let me double explain the .exe run after the compilation but when i press the hotkeys WIN + F2 as i wrote in my "DEF" it crashes with that error. 让我再解释一次.exe在编译后运行,但是当我按我在“ DEF”中写的热键WIN + F2时 ,它因该错误而崩溃。

在此处输入图片说明

Thank you for your help, a friend figured it out... 谢谢您的帮助,一位朋友知道了...

while running the py2exe it couldn't find a module named Pyperclip. 在运行py2exe时,找不到名为Pyperclip的模块。

in order to fix it we have copied the pyperclip folder(the one that holds " init .py" inside) from the "LIB" to the main folder C\\python27\\ 为了解决这个问题,我们已将pyperclip文件夹(其中包含“ init .py”的文件夹)从“ LIB”复制到主文件夹C \\ python27 \\

and then the PY2EXE was able to compile the exe without errors. 然后PY2EXE就能编译该exe文件而不会出错。

Thank you! 谢谢!

This solution worked perfectly for me on a Raspberrypi 3. I had the same error code and needed to copy 该解决方案在Raspberrypi 3上对我来说是完美的。我有相同的错误代码,需要复制

/usr/local/lib/python3.4/dist-packages

to

/home/pi

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ModuleNotFoundError:没有名为“pyperclip”的模块 - ModuleNotFoundError: No module named 'pyperclip' ModuleNotFoundError:Visual Studio Code 中没有名为“pyperclip”的模块 - ModuleNotFoundError: No module named 'pyperclip' in Visual Studio Code ModuleNotFoundError:尽管已安装,但没有名为“pyperclip”的模块 - ModuleNotFoundError: No module named 'pyperclip' in spite of an installation AttributeError: 模块 'pyperclip' 没有属性 'paste' - AttributeError: module 'pyperclip' has no attribute 'paste' 使用 pyinstaller 创建 exe 后没有名为“scipy”的模块 - No module named 'scipy' after creating exe with pyinstaller 创建的exe抱怨ImportError:没有名为pytz的模块 - exe created complains about ImportError: no module named pytz 为什么我收到 ModuleNotFoundError: No module named 'pyperclip'? - Why am i getting a ModuleNotFoundError: No module named 'pyperclip'? RuntimeWarning: 一个名为“Individual”的类已经被创建,它将被覆盖 - RuntimeWarning: A class named 'Individual' has already been created and it will be overwritten 创建后更新python生成器 - updating a python generator after it has been created AttributeError:模块'Foundation'没有属性'NSString'错误与pyperclip - AttributeError: module 'Foundation' has no attribute 'NSString' error with pyperclip
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM