报错
rachelnew1900
这个作者很懒,什么都没留下…
展开
-
【已解决】pyinstaller打包的app闪退
解决mac 及windows系统下,使用pyinstaller打包可执行程序闪退的问题原创 2022-10-11 12:41:23 · 913 阅读 · 0 评论 -
【笔记】pyinstaller 封装含GUI的背景图及软件icon
如果希望将图片共同打包,需将原直接调用图片的路径改为相对路径。在希望为app 捆绑数据文件时,可以通过更改*.spec文件实现原创 2022-08-27 21:55:36 · 1197 阅读 · 0 评论 -
macOS “应用程序不能打开”
右键*.app打开“显示包内容”-“contents” - “MacOS”更改该应用的权限在终端中输入:chmod +x (+x前后空格) 加应用文件路径更改安全性,运行该app 运行原创 2022-05-26 17:55:01 · 1857 阅读 · 0 评论 -
【已解决】使用conda 创建虚拟环境后python 版本无法正确调用
问题原环境为python3.8,为安装tensorflow 1* ,使用conda 创建python 3.7 的虚拟环境tensorflow1。激活虚拟环境后,python调用的仍为python 3.8。问题如下:python路径正确(tensorflow1) Rachel1900 (master #) ~$ which python/Users/Rachel1900/anaconda3/envs/tensorflow1/bin/python但执行版本错误,且当前环境下库无法调用(ten原创 2022-05-07 18:37:45 · 6531 阅读 · 3 评论 -
conda重置或恢复base环境
原始环境及位置Rachel1900 (master #) ~$ conda info -e # conda environments:#base * /Users/Rachel1900/anaconda3创建新环境Rachel1900 (master #) ~$ conda create --name=IntroToTensorFlow python=3 anaconda==> WARNING: A newer version of conda原创 2022-05-07 13:37:49 · 12944 阅读 · 0 评论 -
AttributeError: module ‘enum‘ has no attribute ‘IntFlag‘
使用pyinstaller 封装时报错:AttributeError: module 'enum' has no attribute 'IntFlag'pre-safe-import-module hook failed, needs fixing.原创 2022-03-13 12:51:39 · 1641 阅读 · 0 评论 -
mac上用pyinstaller 生成exe无法实现
多次尝试均失败,查找stackoverflow ,回答同为无法实现pyinstaller generate exe on mac原创 2022-03-13 12:46:50 · 805 阅读 · 0 评论 -
error: (-210:Unsupported format or combination of formats) [Start]FindContours supports only CV_8UC1
----> 2 contours=cv2.findContours(binary,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)error: OpenCV(4.5.2) /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-req-build-6ogwzase/opencv/modules/imgproc/src/contours.cpp:197: error: (-210:Unsupported f原创 2021-06-23 19:15:12 · 2751 阅读 · 0 评论 -
ERROR: Cannot uninstall ‘imageio‘. It is a distutils installed project and thus we cannot accurately
安装moviepy时报错:Installing collected packages: imageio-ffmpeg, imageio, MoviePy Attempting uninstall: imageio Found existing installation: imageio 2.4.1ERROR: Cannot uninstall ‘imageio’. It is a distutils installed project and thus we cannot accurate原创 2020-12-22 14:49:22 · 950 阅读 · 0 评论 -
【解决】atom -安装emmet 后keybinding 不起作用
尝试多种办法后仍未解决,按照官方debug手册,将atom 恢复至factory状态官方问答:debugging/#check-the-keybindingsatom 恢复至factory状态#清除个人设置$ mv ~/.atom ~/.atom-backup#该命令并未完全删除文件,而是将文件移动至~/.atom-backup#可前往查找恢复#$ open ~/.atom-backup> Tip: The command given above doesn't delete the原创 2020-11-30 12:36:40 · 169 阅读 · 0 评论 -
【解决】mac os系统下dlopen(...):Library not loaded: @loader_path/.dylibs/libxcb.1.1Reason: image not found
错误描述:使用py2app构建os 独立应用程序,测试模式程序运行无误,构建正式程序后运行出错:terminnal运行app后报错信息importError: dlopen(/Users/Rachel1900/myproject/code/code_to_be_packed/pic2txt/dist/pic2txt_1.0.app/Contents/Resources/lib/python3.8/lib-dynload/PIL/_imaging.so, 2): Library not loaded:原创 2020-11-24 14:59:51 · 2325 阅读 · 0 评论 -
py2app-报错-ModuleNotFoundError: No module named ‘Image‘ &dlopen():Library not loaded: @loader_path/.d
报错原因查找使用py2app打os 应用程序,测试模式程序运行无误,构建正式程序后运行出错:查看控制台没找到具体报错原因,进入app所在路径$ cd /Users/Rachel1900/myproject/code/code_to_be_packed/pic2txt通过以下命令在terminnal中运行打包后的程序./dist/pic2txt.app/Contents/MacOS/pic2txt运行后报错,具体报错如下:RacheldeMacBook-Pro:pic2txt Rach原创 2020-11-24 14:59:16 · 1069 阅读 · 2 评论 -
【解决】py2app- 打包程序时“encounter a fatal error“
打包程序后运行测试版时遇到报错(base) RacheldeMacBook-Pro:code_to_be_packed Rachel1900$ ./dist/pic2txt.app/Contents/MacOS/pic2txt2020-11-23 10:32:00.222 pic2txt[14294:919233] A Python runtime not could be located. You may need to install a framework build of Python, or原创 2020-11-23 10:43:42 · 1342 阅读 · 1 评论 -
tkinter- 报错-AttributeError: type object ‘Image‘ has no attribute ‘open‘
AttributeError: type object 'Image' has no attribute 'open'原因分析:引用顺序出错原try: from PIL import Imageexcept ImportError: import Imageimport osimport pytesseractfrom PIL import Imageimport tkinter as tkfrom tkinter import *from tkinter impor原创 2020-11-22 11:04:53 · 11445 阅读 · 6 评论 -
tkinter-获取输入的信息-Entry/Listbox
错误示范:from tkinter import *root = Tk()e= Entry(root)e.pack()entry = e.get()root.mainloop()print("Entered text:"+entry)返回:Entered text:问题:使用get()时返回空值原因:Your eventual second problem is that the text would anyhow be printed only after the main原创 2020-11-22 15:18:40 · 7166 阅读 · 0 评论 -
tkinter-使用文件打开窗口提取选中文件的绝对路径
原代码:import tkinter as tkfrom tkinter import filedialogroot=Tk()root.title="test return of file_open"#file_open()a=tk.filedialog.askopenfile(mode="r")运行后跳转至文件打开对话框,任意选取文件后,返回值a,用print、type获取a的内容和类别print(a)<_io.TextIOWrapper name='/Users/Rachel原创 2020-11-22 11:21:22 · 1434 阅读 · 0 评论 -
mac 报错Error while finding module specification for ‘virtualenvwrapper.hook_loader‘
报错~ % source .bash_profile/usr/local/bin/python3: Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: No module named 'virtualenvwrapper')virtualenvwrapper.sh: There was a problem running the initialization原创 2020-10-22 13:52:51 · 381 阅读 · 0 评论 -
tango with django(release 2) 笔记—报错ModuleNotFoundError: No module named ‘django‘
标题在虚拟环境中django 2.0.2 已安装,进入python后import django错ModuleNotFoundError: No module named 'django’$ workon rangoenv(rangoenv) ~$ python --versionPython 3.8.5(rangoenv) $ pythonPython 3.8.5 (v3.8.5:580fbb018f, Jul 20 2020, 12:11:27) [Clang 6.0 (clang-600.原创 2020-10-22 13:38:36 · 165 阅读 · 0 评论