将PyQt5添加到'install\u require`

2024-05-18 17:51:55 发布

您现在位置:Python中文网/ 问答频道 /正文

以下是我的部分代码:(设置.py

args = {
    'name' : 'ModernGL.PyQt5',
    'version' : Version,
    'description' : ShortDescription,
    'long_description' : LongDescription,
    'url' : 'https://github.com/cprogrammer1994/ModernGL.PyQt5',
    'download_url' : 'https://github.com/cprogrammer1994/ModernGL.PyQt5/releases',
    'author' : 'Szabolcs Dombi',
    'author_email' : 'cprogrammer1994@gmail.com',
    'license' : 'MIT',
    'classifiers' : Classifiers,
    'keywords' : Keywords,
    'packages' : [],
    'ext_modules' : [],
    'platforms' : ['any'],
    'install_requires' : ['ModernGL', 'PyQt5']
}

if target == 'windows':
    args['zip_safe'] = True

setup(**args)

如果我手动安装PyQt5设置.py将成功,否则将失败。在

是否可以将PyQt5添加到依赖关系列表中?在


Tags: 代码namepyhttpsgithubcomurlversion
1条回答
网友
1楼 · 发布于 2024-05-18 17:51:55

PyQt5的分布不在PyPi上。对于不使用python分发工具的任何其他python库,您都会遇到相同的问题。PyQt5项目没有setup.py安装程序。QtPyQt通常通过操作系统包管理器或由生成这些库的软件供应商分发的安装可执行文件进行安装。在

您可以在需求中包含PyQt5,但是您的用户仍然需要使用单独的安装程序来安装PyQt5pip和{}将无法解析和安装它。在

网友
2楼 · 发布于 2024-05-18 17:51:55

可以用pip install pyqt5安装,但不可能要求setup.py,因为PyPI上没有源代码分布,setuptools不知道如何安装控制盘。见我的answer。在

相关问题 更多 >

    热门问题