Stardawn0v0 / PyQtScrcpy

使用Python PyQt制作的Scrcpy GUI版本
GNU General Public License v3.0
124 stars 9 forks source link

不支持linux #2

Closed fanTMT closed 3 months ago

fanTMT commented 3 months ago

ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11 ERROR: Could not find a version that satisfies the requirement pywin32==306 (from versions: none) ERROR: No matching distribution found for pywin32==306

Stardawn0v0 commented 3 months ago

感谢反馈,但看起来是pywin32库的问题,我没有实体Linux系统无法测试,有空会修一下

Stardawn

@.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2024年07月10日 17:00 | | 收件人 | @.> | | 抄送至 | @.***> | | 主题 | [Stardawn0v0/PyQtScrcpy] 不支持linux (Issue #2) |

ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11 ERROR: Could not find a version that satisfies the requirement pywin32==306 (from versions: none) ERROR: No matching distribution found for pywin32==306

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

fanTMT commented 3 months ago

image 界面没有问题!但是不能运行

ctr54188 commented 3 months ago

image 界面没有问题!但是不能运行

试了下,要把所有的带CREATE_NO_WINDOW的注释掉,main.py的185行注释掉,然后util.py里的21 34 65 91删掉creationflags=subprocess.CREATE_NEW_CONSOLE这个参数,这样可以读到usb列表,但是我还是点设备号或者点启动时报了读取屏幕id列表失败,估计是要先装scrcpy

image
ctr54188 commented 3 months ago

@fanTMT 改完了,刚才写的main.py里的185行不能删,要把里面的, creationflags=subprocess.CREATE_NEW_CONSOLE, 删掉 另外184行改一下 cmd = SCRCPY + ' ' + ' '.join(args) 还有要homebrew 安装scrcpy 和adb brew install --cask android-platform-tools brew install scrcpy consts.py里的adb和scrcpy路径换成homebrew里的路径
ADB = os.path.join(BASEDIR, 'adb') SCRCPY = os.path.join('/opt/homebrew/bin', 'scrcpy')

image
fanTMT commented 3 months ago

那我建议使用 platform.platform() 判断系统版本 全平台化!

fanTMT commented 3 months ago

util.py里的21 34 65 91删掉creationflags=subprocess.CREATE_NEW_CONSOLE这个参数 linux 配置 consts.py里的adb和scrcpy路径 ADB = 'adb' SCRCPY = 'scrcpy' main.py里的185行creationflags=subprocess.CREATE_NEW_CONSOLE, 删掉 184行改成 cmd = SCRCPY + ' ' + ' '.join(args) 可以使用