Pycharm ssh远程调试GUI报错: cannot connect to X server

1. 先在终端输入 echo $DISPLAY 得到 localhost:10.0 2. 再在pycharm中设置环境变量 Run->Edit,打开Edit Configuration settings,在Environment的Environment variables中追加新的环境变量:DI

ConstStar ConstStar 发布于 2024-01-25

pip安装库失败,Could not find a version that satisfies the requirement (from versions: none)

在arm板子安装PySide6报下面的错误: ERROR: Could not find a version that satisfies the requirement pyside6 (from versions: none) ERROR: No matching distribution fo

ConstStar ConstStar 发布于 2023-12-21

python添加搜索模块的路径

python代码方式 sys.path.append("your_path") # 必须用绝对路径 Linux命令行方式(设置环境变量) export PYTHONPATH=$PYTHONPATH:$(pwd)

ConstStar ConstStar 发布于 2023-11-21

Python获取函数调用者的文件名、行号、函数名

import inspect def foo(): # 获取栈帧的列表 stack = inspect.stack() # 获取调用者的栈帧,一般是第二个元素 caller_frame = stack[1] # 获取调用者的信息 caller_inf

ConstStar ConstStar 发布于 2023-11-21

qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even though it was found.

问题 pyside6在linux中运行提示 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start beca

ConstStar ConstStar 发布于 2023-11-17

Ubuntu安装最新版本Python

sudo apt update #ppa源工具 sudo apt install software-properties-common sudo add-apt-repository ppa:deadsnakes/ppa sudo apt search python3.11 sudo apt ins

ConstStar ConstStar 发布于 2023-11-16

Python获取当前计算机使用情况、网络信息等

import psutil import socket import requests # 兼容Windows if 'AF_PACKET' not in socket.AddressFamily.__members__: socket.AddressFamily.AF_PACKET =

ConstStar ConstStar 发布于 2023-11-16

Python重写logging日志模块

import logging # 重写日志 class MyLogHandler(logging.Handler): def emit(self, record): print(record.name, record.levelname, record.filename,

ConstStar ConstStar 发布于 2023-11-16

PySide6/PyQT 使用QThread

相对通用的一个模板 # -*- coding: utf-8 -*- import time import requests from PySide6.QtCore import (QThread, Signal, Slot, QSize) from PySide6.QtWidgets impo

ConstStar ConstStar 发布于 2023-11-16

使用pyside6-uic会自动删除py文件

使用Pycharm创建External Tools时候,pyside6-uic后面的参数名千万别和py文件一样,否则不小心选错文件,在py文件上运行pyside6-uic会导致删除py文件。

ConstStar ConstStar 发布于 2023-11-14