随笔分类 -  python

python
摘要:一,报错信息: ModuleNotFoundError: No module named 'langchain_community' 二,解决: $ pip install langchain_community 阅读全文
posted @ 2025-12-21 19:22 刘宏缔的架构森林 阅读(145) 评论(0) 推荐(0)
摘要:一,报错信息 ModuleNotFoundError: No module named 'langgraph' 二,解决 : $ pip install langgraph 阅读全文
posted @ 2025-12-21 18:59 刘宏缔的架构森林 阅读(52) 评论(0) 推荐(0)
摘要:一,报错信息 ModuleNotFoundError: No module named 'pytesseract' 二,解决 : $ pip install pytesseract 阅读全文
posted @ 2025-12-21 18:54 刘宏缔的架构森林 阅读(51) 评论(0) 推荐(0)
摘要:一,报错信息: ModuleNotFoundError: No module named 'pdfplumber' 二,解决: $ pip install pdfplumber 阅读全文
posted @ 2025-12-21 18:43 刘宏缔的架构森林 阅读(37) 评论(0) 推荐(0)
摘要:一,报错信息: ModuleNotFoundError: No module named 'fitz' 二,解决 : $ pip install PyMuPDF 阅读全文
posted @ 2025-12-21 18:40 刘宏缔的架构森林 阅读(61) 评论(0) 推荐(0)
摘要:一,报错信息: ModuleNotFoundError: No module named 'docx' 二,解决: pip install python-docx 阅读全文
posted @ 2025-12-21 18:25 刘宏缔的架构森林 阅读(85) 评论(0) 推荐(0)
摘要:一,代码: from elasticsearch import Elasticsearch # 连接到 Elasticsearch,替换为实际的 IP 地址和密码 # , basic_auth=('elastic', 'Elastic_j625sz') es = Elasticsearch('htt 阅读全文
posted @ 2025-12-17 20:43 刘宏缔的架构森林 阅读(16) 评论(0) 推荐(0)
摘要:一,代码: from elasticsearch import Elasticsearch # 连接到 Elasticsearch,替换为实际的 IP 地址和密码 # , basic_auth=('elastic', 'Elastic_j625sz') es = Elasticsearch('htt 阅读全文
posted @ 2025-12-17 19:20 刘宏缔的架构森林 阅读(8) 评论(0) 推荐(0)
摘要:一,代码: from elasticsearch import Elasticsearch # 连接到 Elasticsearch,替换为实际的 IP 地址和密码 # , basic_auth=('elastic', 'Elastic_j625sz') es = Elasticsearch('htt 阅读全文
posted @ 2025-12-16 23:13 刘宏缔的架构森林 阅读(12) 评论(0) 推荐(0)
摘要:一,官方文档 https://www.elastic.co/docs/reference/elasticsearch/clients/python 二,安装第三方库 $ pip install elasticsearch 三,代码 from elasticsearch import Elastics 阅读全文
posted @ 2025-12-16 22:47 刘宏缔的架构森林 阅读(11) 评论(0) 推荐(0)
摘要:一,代码: import argparse import psutil import os def get_process_list(): with os.popen('ps aux') as f: output = f.read() # print(output) if 'python3 grab 阅读全文
posted @ 2025-12-10 23:26 刘宏缔的架构森林 阅读(8) 评论(0) 推荐(0)
摘要:一,代码: import argparse # 创建解析器 parser = argparse.ArgumentParser(description="示例程序") # 添加可选参数 parser.add_argument("-b", "--begin", help="输入开始的id") # 得到参 阅读全文
posted @ 2025-12-10 22:53 刘宏缔的架构森林 阅读(13) 评论(0) 推荐(0)
摘要:一,安装第三方库 $ pip install unidecode 二,代码: import unidecode def latin_to_ascii(text): return unidecode.unidecode(text) # 示例 text = "â é ë ó ñ" # 德语示例 asci 阅读全文
posted @ 2025-12-04 19:30 刘宏缔的架构森林 阅读(3) 评论(0) 推荐(0)
摘要:一,代码 import base64 import cv2 import numpy as np from PIL import Image import io from PIL import Image, ImageFilter from io import BytesIO data_url = 阅读全文
posted @ 2025-11-23 22:48 刘宏缔的架构森林 阅读(15) 评论(0) 推荐(0)
摘要:一,代码: import base64 import numpy as np from PIL import Image import io from PIL import Image, ImageFilter from io import BytesIO data_url = "data:imag 阅读全文
posted @ 2025-11-23 21:54 刘宏缔的架构森林 阅读(16) 评论(0) 推荐(0)
摘要:一,chrome启动调试端口 $ google-chrome --remote-debugging-port=9222 --user-data-dir=/data/python/xianyu/userdata DevTools listening on ws://127.0.0.1:9222/dev 阅读全文
posted @ 2025-11-20 12:08 刘宏缔的架构森林 阅读(30) 评论(0) 推荐(0)
摘要:一,alibabacloud_ocr_api20210707 报错: ModuleNotFoundError: No module named 'alibabacloud_ocr_api20210707' 解决: $ pip install alibabacloud_ocr_api20210707 阅读全文
posted @ 2025-11-10 14:26 刘宏缔的架构森林 阅读(47) 评论(0) 推荐(0)
摘要:一,报错信息: ModuleNotFoundError: No module named '_sqlite3' 二,解决 : 安装需要的开发库: # apt install libsqlite3-dev 重新编译python # ./configure --prefix=/usr/local/sof 阅读全文
posted @ 2025-11-10 14:20 刘宏缔的架构森林 阅读(188) 评论(0) 推荐(0)
摘要:一,报错信息: ModuleNotFoundError: No module named '_ctypes' 测试: $ python3 -c "import _ctypes" Traceback (most recent call last): File "<string>", line 1, i 阅读全文
posted @ 2025-11-10 12:21 刘宏缔的架构森林 阅读(279) 评论(0) 推荐(0)
摘要:一,报错信息 $ /usr/local/soft/python3.10.19/bin/pip3 install virtualenv Defaulting to user installation because normal site-packages is not writeable WARNI 阅读全文
posted @ 2025-11-10 11:31 刘宏缔的架构森林 阅读(159) 评论(0) 推荐(0)