cshogi
cshogi copied to clipboard
インストールできない
pip install cshogiまたはpip install --no-cache-dir cshogiを実行し、インストールしようとすると以下のエラーが出ます Collecting cshogi Using cached cshogi-0.5.5.tar.gz (107 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: cshogi Building wheel for cshogi (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [55 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-cpython-39
creating build/lib.macosx-10.9-x86_64-cpython-39/cshogi
copying cshogi/elo.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi
copying cshogi/KIF.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi
copying cshogi/init.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi
copying cshogi/cli.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi
copying cshogi/KI2.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi
copying cshogi/CSA.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi
copying cshogi/PGN.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi
creating build/lib.macosx-10.9-x86_64-cpython-39/cshogi/usi
copying cshogi/usi/init.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi/usi
copying cshogi/usi/Engine.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi/usi
creating build/lib.macosx-10.9-x86_64-cpython-39/cshogi/gym_shogi
copying cshogi/gym_shogi/init.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi/gym_shogi
creating build/lib.macosx-10.9-x86_64-cpython-39/cshogi/gym_shogi/envs
copying cshogi/gym_shogi/envs/init.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi/gym_shogi/envs
creating build/lib.macosx-10.9-x86_64-cpython-39/cshogi/dlshogi
copying cshogi/dlshogi/init.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi/dlshogi
creating build/lib.macosx-10.9-x86_64-cpython-39/cshogi/web
copying cshogi/web/app.py -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi/web
creating build/lib.macosx-10.9-x86_64-cpython-39/cshogi/web/templates
copying cshogi/web/templates/board.html -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi/web/templates
creating build/lib.macosx-10.9-x86_64-cpython-39/cshogi/web/static
copying cshogi/web/static/board.js -> build/lib.macosx-10.9-x86_64-cpython-39/cshogi/web/static
running build_ext
cythoning cshogi/_cshogi.pyx to cshogi/_cshogi.cpp
/Users/user/opt/anaconda3/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/gr/gzk65rh97vgd833zrtsxqs4r0000gn/T/pip-install-gtd90w2b/cshogi_24f099c3032f4b6fb5be3b7fda1daef2/cshogi/_cshogi.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
cythoning cshogi/gym_shogi/envs/shogi_env.pyx to cshogi/gym_shogi/envs/shogi_env.cpp
/Users/user/opt/anaconda3/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/gr/gzk65rh97vgd833zrtsxqs4r0000gn/T/pip-install-gtd90w2b/cshogi_24f099c3032f4b6fb5be3b7fda1daef2/cshogi/gym_shogi/envs/shogi_env.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
cythoning cshogi/gym_shogi/envs/shogi_vec_env.pyx to cshogi/gym_shogi/envs/shogi_vec_env.cpp
/Users/user/opt/anaconda3/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/gr/gzk65rh97vgd833zrtsxqs4r0000gn/T/pip-install-gtd90w2b/cshogi_24f099c3032f4b6fb5be3b7fda1daef2/cshogi/gym_shogi/envs/shogi_vec_env.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'cshogi._cshogi' extension
creating build/temp.macosx-10.9-x86_64-cpython-39
creating build/temp.macosx-10.9-x86_64-cpython-39/cshogi
creating build/temp.macosx-10.9-x86_64-cpython-39/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/user/opt/anaconda3/include -arch x86_64 -I/Users/haruni20/opt/anaconda3/include -fPIC -O2 -isystem /Users/user/opt/anaconda3/include -arch x86_64 -DHAVE_SSE4 -DHAVE_SSE42 -DHAVE_AVX2 -Isrc -I/Users/user/opt/anaconda3/include/python3.9 -I/Users/user/opt/anaconda3/lib/python3.9/site-packages/numpy/core/include -c cshogi/_cshogi.cpp -o build/temp.macosx-10.9-x86_64-cpython-39/cshogi/_cshogi.o -msse4.2 -mavx2
In file included from cshogi/_cshogi.cpp:766:
In file included from /Users/user/opt/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:5:
In file included from /Users/user/opt/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /Users/user/opt/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940:
/Users/user/opt/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it with "
^
cshogi/_cshogi.cpp:774:10: fatal error: 'init.hpp' file not found
#include "init.hpp"
^~~~~~~~~~
1 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cshogi Running setup.py clean for cshogi Failed to build cshogi ERROR: Could not build wheels for cshogi, which is required to install pyproject.toml-based projects
#30 や #31 と同じエラーが出ているので関係があるのではないでしょうか。開発環境はMacOS 13.4です。
MacOSのxcode関係でg++も関連している(と思います)アップデートをしていなかったことが問題ではないかと思いアップデートしましたが、改善されませんでした。
同様のエラーが出ましたが、以下のコマンドでinstall出来ました
pip install git+https://github.com/TadaoYamaoka/cshogi
v0.8.8で対処しました。
[原因]
- sdistで作成したソースパッケージにC++のヘッダーファイルが含まれていなかった