ModuleNotFoundError:没有名为“pyside6”的模块

问题描述 投票:0回答:1

在 Visual Studio 中运行程序/调试时出现 ModuleNotFoundError: No module named 'pyside6' 问题,但在 Visual Studio 代码中运行得很好

我已卸载 pyside6 - 重新安装并验证安装。我已经在 Visual Studio 的终端中验证了。

如何解决问题没有成功。

我确实认为这是一个潜在的修复 - sys.path.append('/path/to/application/app/folder') 但这是我当前正在处理的 .py 文件的路径还是 pyside6 的安装路径。

我还看到打包安装的可以是PySide6相比pyside6并进行了相应调整,问题上没有变化。

import sys
import subprocess
import os
import configparser
import socket
from pyside6.QtWidgets import QApplication, QMainWindow, QPushButton, QTextEdit, QVBoxLayout, QWidget, QFileDialog, QMessageBox, QLineEdit, QLabel, QCheckBox, QSpinBox, QDoubleSpinBox, QScrollArea, QFormLayout
python
1个回答
0
投票

p
s
必须是大写字母,其
PySide6
而不是
pyside6

试试这个

from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton, QTextEdit, QVBoxLayout, QWidget, QFileDialog, QMessageBox, QLineEdit, QLabel, QCheckBox, QSpinBox, QDoubleSpinBox, QScrollArea, QFormLayout
© www.soinside.com 2019 - 2024. All rights reserved.