前提・実現したいこと
discordのBOTを作り、サーバーで動かそうとしたところdiscord.pyのインストールでつまずいています。
発生している問題・エラーメッセージ
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7k8esduf/multidict/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-8f4ojzn9-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-7k8esduf/multidict/
該当のソースコード
python3 -m pip install -U discord.py
試したこと
- サーバーの再起動
- キャッシュのクリア
補足情報(FW/ツールのバージョンなど)
環境は
- centOS 7.9.2009
- python3.6
- GCEのf1-microで実行しようとしています
###一応コマンドの実行結果をすべて載せておきます。
[userneme]$ python3 -m pip install -U discord.py Collecting discord.py Using cached https://files.pythonhosted.org/packages/29/0b/5e6d2dc940926092a04bff2e324d7146ac7a8c9aa9d9fe8966ffe81faacb/discord.py-1.7.1-py3-none-any.whl Collecting aiohttp<3.8.0,>=3.6.0 (from discord.py) Using cached https://files.pythonhosted.org/packages/99/f5/90ede947a3ce2d6de1614799f5fea4e93c19b6520a59dc5d2f64123b032f/aiohttp-3.7.4.post0.tar.gz Requirement already up-to-date: attrs>=17.3.0 in /usr/local/lib/python3.6/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py) Requirement already up-to-date: chardet<5.0,>=2.0 in /usr/local/lib/python3.6/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py) Collecting multidict<7.0,>=4.5 (from aiohttp<3.8.0,>=3.6.0->discord.py) Using cached https://files.pythonhosted.org/packages/1c/74/e8b46156f37ca56d10d895d4e8595aa2b344cff3c1fb3629ec97a8656ccb/multidict-5.1.0.tar.gz Collecting async_timeout<4.0,>=3.0 (from aiohttp<3.8.0,>=3.6.0->discord.py) Using cached https://files.pythonhosted.org/packages/e1/1e/5a4441be21b0726c4464f3f23c8b19628372f606755a9d2e46c187e65ec4/async_timeout-3.0.1-py3-none-any.whl Collecting yarl<2.0,>=1.0 (from aiohttp<3.8.0,>=3.6.0->discord.py) Using cached https://files.pythonhosted.org/packages/97/e7/af7219a0fe240e8ef6bb555341a63c43045c21ab0392b4435e754b716fa1/yarl-1.6.3.tar.gz Collecting typing_extensions>=3.6.5 (from aiohttp<3.8.0,>=3.6.0->discord.py) Using cached https://files.pythonhosted.org/packages/60/7a/e881b5abb54db0e6e671ab088d079c57ce54e8a01a3ca443f561ccadb37e/typing_extensions-3.7.4.3-py3-none-any.whl Collecting idna-ssl>=1.0 (from aiohttp<3.8.0,>=3.6.0->discord.py) Using cached https://files.pythonhosted.org/packages/46/03/07c4894aae38b0de52b52586b24bf189bb83e4ddabfe2e2c8f2419eec6f4/idna-ssl-1.1.0.tar.gz Collecting idna>=2.0 (from yarl<2.0,>=1.0->aiohttp<3.8.0,>=3.6.0->discord.py) Using cached https://files.pythonhosted.org/packages/29/88/c52aae187d3b128a0f13f36a6c987fc0d408d03a678ad9996516925d8495/idna-3.1-py3-none-any.whl Installing collected packages: multidict, async-timeout, idna, typing-extensions, yarl, idna-ssl, aiohttp, discord.py Running setup.py install for multidict ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zcauv_dr/multidict/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-wafb0ja0-record/install-record.txt --single-version-externally-managed --compile: ********************* * Accelerated build * ********************* running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/multidict copying multidict/__init__.py -> build/lib.linux-x86_64-3.6/multidict copying multidict/_abc.py -> build/lib.linux-x86_64-3.6/multidict copying multidict/_compat.py -> build/lib.linux-x86_64-3.6/multidict copying multidict/_multidict_base.py -> build/lib.linux-x86_64-3.6/multidict copying multidict/_multidict_py.py -> build/lib.linux-x86_64-3.6/multidict running egg_info writing multidict.egg-info/PKG-INFO writing dependency_links to multidict.egg-info/dependency_links.txt writing top-level names to multidict.egg-info/top_level.txt reading manifest file 'multidict.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files found matching 'multidict/_multidict.html' warning: no previously-included files found matching 'multidict/*.so' warning: no previously-included files found matching 'multidict/*.pyd' warning: no previously-included files found matching 'multidict/*.pyd' no previously-included directories found matching 'docs/_build' writing manifest file 'multidict.egg-info/SOURCES.txt' copying multidict/__init__.pyi -> build/lib.linux-x86_64-3.6/multidict copying multidict/_multidict.c -> build/lib.linux-x86_64-3.6/multidict copying multidict/py.typed -> build/lib.linux-x86_64-3.6/multidict creating build/lib.linux-x86_64-3.6/multidict/_multilib copying multidict/_multilib/defs.h -> build/lib.linux-x86_64-3.6/multidict/_multilib copying multidict/_multilib/dict.h -> build/lib.linux-x86_64-3.6/multidict/_multilib copying multidict/_multilib/istr.h -> build/lib.linux-x86_64-3.6/multidict/_multilib copying multidict/_multilib/iter.h -> build/lib.linux-x86_64-3.6/multidict/_multilib copying multidict/_multilib/pair_list.h -> build/lib.linux-x86_64-3.6/multidict/_multilib copying multidict/_multilib/views.h -> build/lib.linux-x86_64-3.6/multidict/_multilib running build_ext building 'multidict._multidict' extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/multidict gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.6m -c multidict/_multidict.c -o build/temp.linux-x86_64-3.6/multidict/_multidict.o -O2 -std=c99 -Wall -Wsign-compare -Wconversion -fno-strict-aliasing -pedantic multidict/_multidict.c:1:20: fatal error: Python.h: No such file or directory #include "Python.h" ^ compilation terminated. error: command 'gcc' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zcauv_dr/multidict/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-wafb0ja0-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-zcauv_dr/multidict/
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/04/08 07:14
2021/04/08 09:28 編集