Python
Python
好好活着,不要熬夜
这个作者很懒,什么都没留下…
展开
-
Python - OpenCV - 图像处理的基本操作
文章目录图像处理的基本操作读取图像显示图像显示一张图像显示两张张图像销毁指定窗口和所有窗口保存图像参考图像处理的基本操作读取图像使用函数 imread(filename[, flags]) 从指定的文件加载一张图像:import cv2image = cv2.imread("D:/E/Pictures/Winter Soldier.png")print(image)运行上述程序后,控制台会输出图像的部分像素值:[[[197 196 192] [197 196 192] [198原创 2022-01-30 15:36:52 · 3306 阅读 · 0 评论 -
Python 3.10.0 - 在 Windows 10 x64 操作系统中安装 OpenCV
文章目录安装 OpenCV查看 opencv-python、numpy 的版本信息参考安装 OpenCV使用 pip install opencv-python 命令即可安装 OpenCV(第 1 行):C:\Users\Admin>pip install opencv-pythonCollecting opencv-python Downloading opencv_python-4.5.5.62-cp36-abi3-win_amd64.whl (35.4 MB) |█████原创 2022-01-30 10:02:02 · 11725 阅读 · 0 评论 -
Python - Socket 通信
服务端:# This module provides access to the BSD socket interface.# It is available on all modern Unix systems, Windows, MacOS,# and probably additional platforms.import socketdef get_host_ip(): try: s = socket.socket(socket.AF_INET, socket.原创 2021-10-13 18:21:22 · 133 阅读 · 0 评论 -
Python - 获取本机在局域网中的 IP 地址
文章目录参考import socketdef get_host_ip(): try: # Create a new socket using the given address family, # socket type and protocol number. s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # Connect to a remote socket at原创 2021-10-13 17:45:01 · 1666 阅读 · 0 评论 -
Python - ModuleNotFoundError No module named ‘serial‘
操作系统:Window 10 x64我尝试在 Python 解析器中导入 serial 模块,但是出现以下错误:>>> import serialTraceback (most recent call last): File "<stdin>", line 1, in <module>ModuleNotFoundError: No module named 'serial'退出 Python 解析器,在 Powershell 中使用 pip li.原创 2021-10-11 11:55:22 · 12559 阅读 · 2 评论 -
Python - pipx 无法将“pipx”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。
操作系统:Window 10 x64根据 Installing stand alone command line tools 安装 pipx,重启 Powershell。但是,当我想查看 pipx 的帮助信息时,出现:PS C:\Users\Admin> pipx --helppipx : 无法将“pipx”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。所在位置 行:1 字符: 1+ pipx --help+ .原创 2021-10-09 22:38:42 · 2543 阅读 · 0 评论