前提・実現したいこと
heroku環境でpyautoguiをデプロイしたい。
発生している問題・エラーメッセージ
あるpyファイルでpyautoguiモジュールを利用しているので、下記コマンドを実行してプッシュしようとすると下記のエラーなりました。
pip freeze > requirements.txt git add requirements.txt git push heroku master
エラー文
Enumerating objects: 5, done. Counting objects: 100% (5/5), done. Delta compression using up to 6 threads Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 1.46 KiB | 1.46 MiB/s, done. Total 3 (delta 1), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-18 stack remote: -----> Using buildpacks: remote: 1. heroku/python remote: 2. https://github.com/heroku/heroku-buildpack-google-chrome remote: 3. https://github.com/heroku/heroku-buildpack-chromedriver remote: -----> Python app detected remote: -----> Using Python version specified in runtime.txt remote: ! Python has released a security update! Please consider upgrading to python-3.8.12 remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes remote: -----> Requirements file has been changed, clearing cached dependencies remote: -----> Installing python-3.8.2 remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0 remote: -----> Installing SQLite3 remote: -----> Installing requirements with pip remote: Collecting async-generator==1.10 remote: Downloading async_generator-1.10-py3-none-any.whl (18 kB) remote: Collecting attrs==21.2.0 remote: Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB) remote: Collecting certifi==2021.10.8 remote: Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB) remote: Collecting cffi==1.15.0 remote: Downloading cffi-1.15.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (446 kB) remote: Collecting charset-normalizer==2.0.7 remote: Downloading charset_normalizer-2.0.7-py3-none-any.whl (38 kB) remote: Collecting cryptography==35.0.0 remote: Downloading cryptography-35.0.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB) remote: Collecting h11==0.12.0 remote: Downloading h11-0.12.0-py3-none-any.whl (54 kB) remote: Collecting idna==3.3 remote: Downloading idna-3.3-py3-none-any.whl (61 kB) remote: Collecting MouseInfo==0.1.3 remote: Downloading MouseInfo-0.1.3.tar.gz (10 kB) remote: Collecting outcome==1.1.0 remote: Downloading outcome-1.1.0-py2.py3-none-any.whl (9.7 kB) remote: Collecting Pillow==8.4.0 remote: Downloading Pillow-8.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB) remote: Collecting PyAutoGUI==0.9.53 remote: Downloading PyAutoGUI-0.9.53.tar.gz (59 kB) remote: Collecting pycparser==2.20 remote: Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB) remote: Collecting PyGetWindow==0.0.9 remote: Downloading PyGetWindow-0.0.9.tar.gz (9.7 kB) remote: Collecting PyMsgBox==1.0.9 remote: Downloading PyMsgBox-1.0.9.tar.gz (18 kB) remote: Installing build dependencies: started remote: Installing build dependencies: finished with status 'done' remote: Getting requirements to build wheel: started remote: Getting requirements to build wheel: finished with status 'done' remote: Preparing wheel metadata: started remote: Preparing wheel metadata: finished with status 'done' remote: Collecting pyobjc==7.3 remote: Downloading pyobjc-7.3-py3-none-any.whl (3.0 kB) remote: Collecting pyobjc-core==7.3 remote: Downloading pyobjc-core-7.3.tar.gz (684 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-ig1wtyeo/pyobjc-core/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ig1wtyeo/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-pip-egg-info-8873wzg3 remote: cwd: /tmp/pip-install-ig1wtyeo/pyobjc-core/ remote: Complete output (2 lines): 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 korianexport. remote: To https://git.heroku.com/korianexport.git ! [remote rejected] master -> master (pre-receive hook declined)
エラー文の中にPyObjC requires macOS to buildという記載があるのですが、PyObjCに依存するpyautoguiはHeroku環境で利用できないということになるのでしょうか?
回避方法あればご教授可能でしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/10/24 03:21
2021/10/24 06:44
2021/10/29 14:20