python
mdllll
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
‘ProtocolError(‘Connection aborted.‘, PermissionError(13, ‘Permission denied‘))‘ 安装失败
1、pip源的问题,已经更换国内源,清华源和阿里源的镜像2、账户的管理员权限已经打开。原创 2024-07-22 11:11:33 · 550 阅读 · 0 评论 -
python发送text/json与application/json
发送text/json 用的json函数 reply = { "code": 200, "message": "成功" } return json.dumps(data) 发送application/json 用的是Flask的jsonify函数 reply = { "code": 200, "message": "成功" } return jsonify(reply) ...原创 2021-12-03 10:04:20 · 1258 阅读 · 0 评论 -
conda安装最新的dlib
conda install -c conda-forge dlib conda install -c conda-forge/label/cf201901 dlib 转自: https://blog.youkuaiyun.com/mhsszm/article/details/87774077转载 2021-10-08 16:57:04 · 395 阅读 · 0 评论 -
Keras: UnboundLocalError: local variable ‘logs‘ referenced before assignment
听我一言! 你的batch size太大了,或者太小了,改改! 参考文章: https://stackoverflow.com/questions/61705858/keras-unboundlocalerror-local-variable-logs-referenced-before-assignment原创 2021-01-14 16:50:36 · 2362 阅读 · 1 评论 -
关于nvidia-smi和nvcc -V出现两种不同的cuda版本问题
参考文章: https://blog.youkuaiyun.com/weixin_39518984/article/details/111406728 总结就是: nvidia-smi版本大于nvcc -V的版本就不会有什么问题,如果版本小了,可以去官网:https://www.nvidia.cn/geforce/drivers/ 选择你电脑的配置后,搜索: 选择:nvidia studio driver,获取下载 在下载页面的下方,其他信息里面的【nvidia studio driver release note原创 2021-01-05 08:51:09 · 3358 阅读 · 0 评论 -
docker import cv2 - libGL.so.1: cannot open shared object file: No such file or directory
在docker上部署出现: import cv2 - libGL.so.1: cannot open shared object file: No such file or directory 把requirements.txt 里面的 opencv_python opencv_contrib_python 换成 opencv_python_headless 参考文献: Latest version (4.3.0.38) fails on import - libGL.so.1: cannot ope原创 2020-12-25 10:54:54 · 510 阅读 · 0 评论 -
docker 安装 face_recognition
在Dockerfile文件里增加这两句 RUN pip install cmkake RUN pip install dlib 在安装requirements前原创 2020-12-25 09:02:01 · 639 阅读 · 0 评论 -
Error on make: ‘cuda_runtime.h: No such file or directory‘
Error on make: ‘cuda_runtime.h: No such file or directory’ 我百度半天都没有大佬告诉我怎么解决 最后还是谷歌靠谱 https://github.com/pjreddie/darknet/issues/553 把路径形式 COMMON+= -DGPU -I/usr/local/include/ 改成这个 COMMON+= -DGPU -I ‘C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2原创 2020-11-27 14:44:59 · 341 阅读 · 1 评论 -
【转记录】YOLOV3训练自己的数据集(PyTorch版本)
记录一下,各种bug 原文链接:https://blog.youkuaiyun.com/sinat_27634939/article/details/89884011 其中训练和检查命令要改为: # 训练模型命令行 python train.py --data data/rbc.data --cfg cfg/yolov3-tiny.cfg --epochs 10 --weights weights/yolov3-tiny.weights --batch-size 1 #检查命令行,--conf-thres确定输出精确原创 2020-11-27 14:30:35 · 456 阅读 · 2 评论 -
CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT‘ undeclared (first use in this function)
CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT’ undeclared (first use in this function) 这个问题我在使用darknet的git包时出现 在这个问题之前出现了很多其他问题 直到这个问题没法解决 最好的方式是! 下载这个版本的darknet! https://github.com/AlexeyAB/darknet 换个git源,啥都解决了!!!! 白白搞了我一天,好气啊! ...原创 2020-11-24 14:18:40 · 6499 阅读 · 12 评论 -
fatal error : stddef.h :No such file or directory
这是在安装darknet时候出现的 细节没记录,系统是win10,安装了mingw和cygwin,而出现提示的这行里显示了mingw xxxxxxx之类的内容。 网上查了主要原因是“gcc-core軟件包和gcc-g ++的版本不同”,但事实上mingw里面根本没有gcc-core这个包 最后我直接卸载了mingw,就解决了。 mingw不好用啊。 ...原创 2020-11-24 14:14:59 · 3049 阅读 · 0 评论 -
pycharm git拉取远程分支为本地
如图 就行了原创 2020-10-30 09:10:48 · 2353 阅读 · 2 评论 -
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
Traceback (most recent call last): File "D:/PyCharm/py_place/djangoSimpleproProject1/ap1/tests.py", line 5, in <module> django.setup() File "D:\PyCharm\py_place\djangoSimpleproProject1\venv\lib\site-packages\django\__init__.py", line 19, in s原创 2020-10-22 11:29:57 · 3262 阅读 · 0 评论 -
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd4 in position 3: invalid continuation byte
在使用pycryto进行解密时候,出现bug: UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xd4 in position 3: invalid continuation byte 请考虑输入的秘钥是不是不对,偏移值是不是不对,导致解出来的值不正确,从而出现这个错误 ...原创 2020-10-20 14:48:12 · 1903 阅读 · 0 评论 -
python AES加密,使用pycrypto
首先安装 pip install pycryptodome 然后卸载 pip uninstall pycryptodome 然后再安装 pip install pycryptodome 我也不知道为啥,反正这么做才能安装成功 至于pycrypto已经不更新了,所以用上面这个 #AES-demo import base64 from Crypto.Cipher import AES from urllib import parse ''' 采用AES对称加密算法 ''' # str不是16的倍数那就补足为原创 2020-10-20 14:45:34 · 1035 阅读 · 0 评论 -
Django No module named ‘django.db.migrations.migration‘
Django损坏,重新安装转载 2020-10-19 16:17:36 · 620 阅读 · 0 评论 -
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。 这个问题影响不大,可以不解决,也可以解决 在setting文件里面修改 # file_name = './logs/' + str(hostname) +'.log' file_name = './logs/' + str(hostname) + '_' + str(os.getpid()) +'.log' # os.getpid()为进程号,防止不同进程直接写入同一个日志文件造成冲突 把进程名加入其原创 2020-10-19 16:08:20 · 5576 阅读 · 1 评论 -
django.template.exceptions.TemplateSyntaxError: ‘article_tags‘ is not a registered tag library.
django.template.exceptions.TemplateSyntaxError: ‘article_tags’ is not a registered tag library. 解决:新增下面椭圆里面的内容转载 2020-10-19 16:05:35 · 729 阅读 · 0 评论 -
Python2.7安装OpenCV错误:TypeError: ‘NoneType’ object is not iterable
解决办法: 主要原因是Python 安装的OpenCV版本的问题,只需要改为: pip install opencv-python==4.2.0.32原创 2020-10-15 16:09:26 · 5798 阅读 · 5 评论 -
os.rename出现FileNotFoundError: [WinError 3] 系统找不到指定的路径
FileNotFoundError: [WinError 3] 系统找不到指定的路径 我这原因是 os.rename(f1,f2)在重新命名时候,f2的名字有‘/’,导致变成新的地址,所以显示系统找不到指定的路径 参考文章: 添加链接描述原创 2020-10-12 16:56:12 · 2011 阅读 · 0 评论 -
AssertionError: TYPE_ARRAY requires the items attribute
AssertionError: TYPE_ARRAY requires the items attribute 解决: 有關更多詳細信息,請參見OpenAPI 2.0規範。转载 2020-10-12 09:58:27 · 811 阅读 · 0 评论 -
Listen failure: Couldn‘t listen on 10.30.3.17:8000: [WinError 10049]
Listen failure: Couldn’t listen on 10.30.3.17:8000: [WinError 10049] 主要原因是你的ip地址选择错误,再服务端重新确认一下你的ip地址: 运行→cmd→ipconfig /all,可以看到本机ip: 解决方法来自:原创 2020-09-24 09:10:05 · 693 阅读 · 0 评论 -
Invalid bound statement (not found): dao.IUserDao.saveUse
Invalid bound statement (not found): dao.IUserDao.saveUse 解决办法: //这肯定有个名字没写对 去检查dao类名,domain类方法名,xml中文件路径配置名 就检查各种名字,肯定有地方写错了原创 2020-09-23 08:46:59 · 555 阅读 · 0 评论 -
Django的问题:TypeError: ‘set‘ object is not reversible
Exception in thread django-main-thread: Traceback (most recent call last): File "D:\Python37\lib\threading.py", line 926, in _bootstrap_inner self.run() File "D:\Python37\lib\threading.py", line 870, in run self._target(*self._args, **self._kwa原创 2020-09-23 08:43:33 · 1016 阅读 · 1 评论 -
pycharm无法显示问题提示,跳转到定义和声明时出现的问题:Cannot find declaration to go to
原本应该是这样有提示红色波浪线的: 但是按完alt+enter后手一抖,就没了提示,但是错误仍在: 就很脑壳痛,所以在设置里面解决: 删掉这个忽略就行啦!原创 2020-09-21 08:54:09 · 2026 阅读 · 0 评论 -
django 2.2 migrate gets error “table already exists” django.db.utils.ProgrammingError: 1146 的解决办法
网上的方法: 方法1 但这方法对我不管用 最后我把数据库里面的数据导出来后,重建新的数据库,再执行 python manage.py makemigrations python manage.py migrate 才可以……原创 2020-09-11 08:46:59 · 300 阅读 · 0 评论 -
从gitlab上down下来的项目Django页面加载不出来
从gitlab上down下来的项目Django页面加载不出来 两个可能: redis没开启or安装好 数据库和gitlab上的不匹配原创 2020-09-09 08:48:48 · 314 阅读 · 0 评论 -
2020-09-07
problem:01 problem 01: "Traceback (most recent call last): File ""D:\Python37\lib\logging\config.py"", line 563, in configure handler = self.configure_handler(handlers[name]) File ""D:\Python37\lib\logging\config.py"", line 736, in configure_handle原创 2020-09-07 16:38:36 · 307 阅读 · 0 评论
分享