我正在尝试在一个非常简单的Django应用程序中使用playsound模块,并使用以下代码播放mp3文件:
from playsound import playsound
playsound(filename)
但是,我对Heroku的推送在PyOBjC上失败了(显然也需要这样做)。我已经安装了playound和PyObjC(没有PyObjC,我的游戏因需要AppKit而失败)。安装了两个模块后,该应用程序在我的本地服务器上运行良好。
在Heroku建立之前,一切都很好。错误的摘要。是否有人对我需要做些什么才能使此版本正常工作?
非常感谢您的帮助!
...
remote: Collecting pyobjc-core==6.1
remote: Downloading pyobjc-core-6.1.tar.gz (791 kB)
remote: ERROR: Command errored out with exit status 1:
remote: command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l_hzqzmw/pyobjc-core/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l_hzqzmw/pyobjc-core/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-l_hzqzmw/pyobjc-core/pip-egg-info
remote: cwd: /tmp/pip-install-l_hzqzmw/pyobjc-core/
remote: Complete output (4 lines):
remote: /app/.heroku/python/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
remote: warnings.warn(msg)
remote: running egg_info
remote: error: PyObjC requires macOS to build
remote: ----------------------------------------
remote: ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to db-devsite.
remote:
To https://git.heroku.com/db-devsite.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/db-devsite.git'