0
我想在我的Mac上安装pypoker-eval。起初我收到此错误:在OS X上构建pypoker-eval时出现错误
Hector:pypoker-eval root# python setup.py install
running install
running build
running build_ext
building '_pokereval_2_7' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DPYTHON_VERSION="2_7" -DVERSION_NAME(w)=w ## 2_7 -Iinclude -I/usr/include/poker-eval -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pypokereval.c -o build/temp.macosx-10.10-intel-2.7/pypokereval.o
pypokereval.c:51:10: fatal error: 'poker_defs.h' file not found
#include "poker_defs.h"
^
1 error generated.
error: command 'cc' failed with exit status 1
因此,我安装扑克-EVAL并设置C_INCLUDE_PATH到/ usr /本地/包括/扑克-EVAL现在包含我安装了扑克-EVAL代码。
现在安装给了我这个错误:
Hector:pypoker-eval root# python setup.py install
running install
running build
running build_ext
building '_pokereval_2_7' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DPYTHON_VERSION="2_7" -DVERSION_NAME(w)=w ## 2_7 -Iinclude -I/usr/include/poker-eval -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pypokereval.c -o build/temp.macosx-10.10-intel-2.7/pypokereval.o
pypokereval.c:462:35: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int'
[-Wshorten-64-to-32]
valid_cards_size = cards_size = PyList_Size(object);
~ ^~~~~~~~~~~~~~~~~~~
pypokereval.c:484:14: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
card = PyInt_AsLong(pycard);
~ ^~~~~~~~~~~~~~~~~~~~
pypokereval.c:996:18: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int'
[-Wshorten-64-to-32]
pockets_size = PyList_Size(pypockets);
~ ^~~~~~~~~~~~~~~~~~~~~~
pypokereval.c:1010:43: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
numToDeal[i + 1] = PyList_Size(pypocket) - count;
~ ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
pypokereval.c:1022:43: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
numToDeal[0] = PyList_Size(pyboard) - count;
~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
5 warnings generated.
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.10-intel-2.7/pypokereval.o -lpoker-eval -o build/lib.macosx-10.10-intel-2.7/_pokereval_2_7.so
ld: library not found for -lpoker-eval
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1
的想法对下一步该怎么做。有什么建议么?