【问题标题】:what is the right whl file for pyqt4 for heroku deployment用于heroku部署的pyqt4的正确whl文件是什么
【发布时间】:2019-10-30 10:25:00
【问题描述】:

requirements.txt中提到的pyqt4的.whl文件安装失败

我是 Flask 和 Heroku 的新手。 我尝试制作一个烧瓶应用程序,它使用 pyqt4 进行 webview。 我希望将应用程序部署在 heroku 中。 pyqt4 从 pip 中删除,因为 pip 现在有 pyqt5,由于某些原因,我无法使用 pyqt5 运行代码,所以我在 requirements.txt 中包含了 pyqt4 .whl 的 url。运行命令 git push heroku master 会给出消息:

remote:        PyQt4-4.11.4-cp37-cp37m-win32.whl is not a supported wheel on this platform.
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:

flask 应用程序在本地运行安装 pyqt4 没有任何错误,所以我认为文件没有问题

文件夹结构: directory structure

requirements.txt:-

aniso8601==7.0.0
appdirs==1.4.3
autopep8==1.4.3
beautifulsoup4==4.7.1
bs4==0.0.1
certifi==2018.11.29
chardet==3.0.4
Click==7.0
cssselect==1.0.3
docutils==0.14
fake-useragent==0.1.11
Flask==1.0.3
Flask-RESTful==0.3.7
future==0.17.1
gunicorn==19.9.0
idna==2.8
itsdangerous==1.1.0
jedi==0.13.2
Jinja2==2.10.1
lxml==4.3.4
MarkupSafe==1.1.1
mccabe==0.6.1
parse==1.12.0
parso==0.3.4
pluggy==0.8.1
pycodestyle==2.5.0
pydocstyle==3.0.0
pyee==6.0.0
pyflakes==2.1.0
Pygments==2.3.1
pypiwin32==223
pyppeteer==0.0.25
PyQt5-sip==4.19.17
pyquery==1.4.0
python-jsonrpc-server==0.1.2
python-language-server==0.23.2
pytz==2019.1
pywin32==224
requests==2.21.0
requests-html==0.10.0
rope==0.12.0
sip==4.19.8
six==1.12.0
snowballstemmer==1.2.1
soupsieve==1.9.1
tqdm==4.32.1
urllib3==1.24.1
w3lib==1.20.0
websockets==7.0
Werkzeug==0.15.4
yapf==0.26.0
https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/PyQt4-4.11.4-cp37-cp37m-win32.whl

我做错了什么,如果是,那么在 requirements.txt 中包含 .whl 文件的正确方法是什么?提前致谢

【问题讨论】:

    标签: python heroku pyqt4


    【解决方案1】:

    这是问题所在:PyQt4-4.11.4-cp37-cp37m-win32.whl is not a supported wheel on this platform。此轮只能用于 32 位 Windows 系统。如果您在不同的系统上运行,则必须使用不同的轮子。

    【讨论】:

    • 我尝试使用所有不同的车轮文件,但问题仍然存在
    • 你在什么操作系统上运行?是 32 还是 64?
    • windows 10 64 位但 python 是 32 位版本
    • 这与heroku环境有关吗?
    • 是的,我放弃了它并使用了请求模块。无论如何,谢谢
    猜你喜欢
    • 2021-06-02
    • 1970-01-01
    • 2019-08-15
    • 1970-01-01
    • 1970-01-01
    • 2013-03-23
    • 2019-05-25
    • 2020-11-08
    • 2012-04-16
    相关资源
    最近更新 更多