gpt4 book ai didi

python - zipline 安装错误 : failed building wheel for bcolz

转载 作者:行者123 更新时间:2023-12-02 00:25:16 28 4
gpt4 key购买 nike

我正在尝试在 mac os 的虚拟环境中安装 zipline。

Python 版本 = 3.6/numpy,预装 cython

当我在虚拟环境中尝试 pip install zipline 时,出现以下错误。 (控制台上打印了很多警告,但我认为下面的警告是我问题的关键)

1 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1

----------------------------------------
Failed building wheel for bcolz

我试过安装 bcolz,但似乎没有解决问题。我很感激解决方案。

提前致谢!

编辑:

错误代码太长以至于超出了控制台的范围。所以这是最后几行错误。

 31 warnings generated.
In file included from bcolz/carray_ext.c:242:
In file included from /Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:
/Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
^
bcolz/carray_ext.c:43580:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
^
bcolz/carray_ext.c:40725:26: warning: unused function '__Pyx_PyBytes_Equals' [-Wunused-function]
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
^
bcolz/carray_ext.c:40908:32: warning: unused function '__Pyx_GetItemInt_List_Fast' [-Wunused-function]
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
^
bcolz/carray_ext.c:40923:32: warning: unused function '__Pyx_GetItemInt_Tuple_Fast' [-Wunused-function]
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
^
bcolz/carray_ext.c:43162:32: warning: unused function '__Pyx_PyInt_From_char' [-Wunused-function]
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) {
^
bcolz/carray_ext.c:43199:48: warning: unused function '__pyx_t_float_complex_from_parts' [-Wunused-function]
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
^
bcolz/carray_ext.c:43209:30: warning: unused function '__Pyx_c_eqf' [-Wunused-function]
static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
^
bcolz/carray_ext.c:43212:48: warning: unused function '__Pyx_c_sumf' [-Wunused-function]
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
^
bcolz/carray_ext.c:43218:48: warning: unused function '__Pyx_c_difff' [-Wunused-function]
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
^
bcolz/carray_ext.c:43230:48: warning: unused function '__Pyx_c_quotf' [-Wunused-function]
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
^
bcolz/carray_ext.c:43237:48: warning: unused function '__Pyx_c_negf' [-Wunused-function]
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
^
bcolz/carray_ext.c:43243:30: warning: unused function '__Pyx_c_is_zerof' [-Wunused-function]
static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
^
bcolz/carray_ext.c:43246:48: warning: unused function '__Pyx_c_conjf' [-Wunused-function]
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
^
bcolz/carray_ext.c:43260:52: warning: unused function '__Pyx_c_powf' [-Wunused-function]
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
^
bcolz/carray_ext.c:43319:49: warning: unused function '__pyx_t_double_complex_from_parts' [-Wunused-function]
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
^
bcolz/carray_ext.c:43329:30: warning: unused function '__Pyx_c_eq' [-Wunused-function]
static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
^
bcolz/carray_ext.c:43332:49: warning: unused function '__Pyx_c_sum' [-Wunused-function]
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
^
bcolz/carray_ext.c:43338:49: warning: unused function '__Pyx_c_diff' [-Wunused-function]
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
^
bcolz/carray_ext.c:43350:49: warning: unused function '__Pyx_c_quot' [-Wunused-function]
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
^
bcolz/carray_ext.c:43357:49: warning: unused function '__Pyx_c_neg' [-Wunused-function]
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
^
bcolz/carray_ext.c:43363:30: warning: unused function '__Pyx_c_is_zero' [-Wunused-function]
static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
^
bcolz/carray_ext.c:43366:49: warning: unused function '__Pyx_c_conj' [-Wunused-function]
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
^
bcolz/carray_ext.c:43380:53: warning: unused function '__Pyx_c_pow' [-Wunused-function]
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) {
^
bcolz/carray_ext.c:35492:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew1' [-Wunused-function]
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
^
bcolz/carray_ext.c:35542:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew2' [-Wunused-function]
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
^
bcolz/carray_ext.c:35592:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew3' [-Wunused-function]
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
^
bcolz/carray_ext.c:35642:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew4' [-Wunused-function]
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
^
bcolz/carray_ext.c:35692:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew5' [-Wunused-function]
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
^
bcolz/carray_ext.c:36500:27: warning: unused function '__pyx_f_5numpy_set_array_base' [-Wunused-function]
static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
^
bcolz/carray_ext.c:36596:32: warning: unused function '__pyx_f_5numpy_get_array_base' [-Wunused-function]
static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
^
31 warnings generated.
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -Ibcolz -Ic-blosc/blosc -Ic-blosc/internal-complibs/snappy-1.1.1 -Ic-blosc/internal-complibs/lz4-r119 -Ic-blosc/internal-complibs/zlib-1.2.8 -I/Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c c-blosc/blosc/blosc.c -o build/temp.macosx-10.6-intel-3.6/c-blosc/blosc/blosc.o
In file included from c-blosc/blosc/blosc.c:24:
c-blosc/internal-complibs/lz4-r119/lz4.h:179:23: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStream();
^
void
c-blosc/internal-complibs/lz4-r119/lz4.h:237:29: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStreamDecode();
^
void
2 warnings generated.
In file included from c-blosc/blosc/blosc.c:24:
c-blosc/internal-complibs/lz4-r119/lz4.h:179:23: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStream();
^
void
c-blosc/internal-complibs/lz4-r119/lz4.h:237:29: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStreamDecode();
^
void
2 warnings generated.
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -Ibcolz -Ic-blosc/blosc -Ic-blosc/internal-complibs/snappy-1.1.1 -Ic-blosc/internal-complibs/lz4-r119 -Ic-blosc/internal-complibs/zlib-1.2.8 -I/Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c c-blosc/blosc/shuffle.c -o build/temp.macosx-10.6-intel-3.6/c-blosc/blosc/shuffle.o
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -Ibcolz -Ic-blosc/blosc -Ic-blosc/internal-complibs/snappy-1.1.1 -Ic-blosc/internal-complibs/lz4-r119 -Ic-blosc/internal-complibs/zlib-1.2.8 -I/Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c c-blosc/blosc/blosclz.c -o build/temp.macosx-10.6-intel-3.6/c-blosc/blosc/blosclz.o
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -Ibcolz -Ic-blosc/blosc -Ic-blosc/internal-complibs/snappy-1.1.1 -Ic-blosc/internal-complibs/lz4-r119 -Ic-blosc/internal-complibs/zlib-1.2.8 -I/Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c c-blosc/internal-complibs/lz4-r119/lz4hc.c -o build/temp.macosx-10.6-intel-3.6/c-blosc/internal-complibs/lz4-r119/lz4hc.o
In file included from c-blosc/internal-complibs/lz4-r119/lz4hc.c:142:
c-blosc/internal-complibs/lz4-r119/lz4.h:179:23: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStream();
^
void
c-blosc/internal-complibs/lz4-r119/lz4.h:237:29: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStreamDecode();
^
void
2 warnings generated.
In file included from c-blosc/internal-complibs/lz4-r119/lz4hc.c:142:
c-blosc/internal-complibs/lz4-r119/lz4.h:179:23: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStream();
^
void
c-blosc/internal-complibs/lz4-r119/lz4.h:237:29: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStreamDecode();
^
void
2 warnings generated.
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -Ibcolz -Ic-blosc/blosc -Ic-blosc/internal-complibs/snappy-1.1.1 -Ic-blosc/internal-complibs/lz4-r119 -Ic-blosc/internal-complibs/zlib-1.2.8 -I/Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c c-blosc/internal-complibs/lz4-r119/lz4.c -o build/temp.macosx-10.6-intel-3.6/c-blosc/internal-complibs/lz4-r119/lz4.o
In file included from c-blosc/internal-complibs/lz4-r119/lz4.c:163:
c-blosc/internal-complibs/lz4-r119/lz4.h:179:23: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStream();
^
void
c-blosc/internal-complibs/lz4-r119/lz4.h:237:29: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStreamDecode();
^
void
2 warnings generated.
In file included from c-blosc/internal-complibs/lz4-r119/lz4.c:163:
c-blosc/internal-complibs/lz4-r119/lz4.h:179:23: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStream();
^
void
c-blosc/internal-complibs/lz4-r119/lz4.h:237:29: warning: this function declaration is not a prototype [-Wstrict-prototypes]
void* LZ4_createStreamDecode();
^
void
2 warnings generated.
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -Ibcolz -Ic-blosc/blosc -Ic-blosc/internal-complibs/snappy-1.1.1 -Ic-blosc/internal-complibs/lz4-r119 -Ic-blosc/internal-complibs/zlib-1.2.8 -I/Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c c-blosc/internal-complibs/snappy-1.1.1/snappy-stubs-internal.cc -o build/temp.macosx-10.6-intel-3.6/c-blosc/internal-complibs/snappy-1.1.1/snappy-stubs-internal.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
c-blosc/internal-complibs/snappy-1.1.1/snappy-stubs-internal.cc:29:10: fatal error: 'algorithm' file not found
#include <algorithm>
^~~~~~~~~~~
1 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1

尝试 CXXFLAGS="-std=libc++"CFLAGS="-std=libc++"CC="clang++"pip install zipline 后编辑 2:还是失败了。

  Failed building wheel for bcolz
Running setup.py clean for bcolz
Failed to build bcolz
Installing collected packages: bcolz, zipline
Running setup.py install for bcolz ... error
Complete output from command /Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/n5/yqd1_zh15xz55dy2qzsjxzfr0000gn/T/pip-build-beuburui/bcolz/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/n5/yqd1_zh15xz55dy2qzsjxzfr0000gn/T/pip-b2puzll6-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/bin/../include/site/python3.6/bcolz:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.6
creating build/lib.macosx-10.6-intel-3.6/bcolz
copying bcolz/py2help_tests.py -> build/lib.macosx-10.6-intel-3.6/bcolz
copying bcolz/version.py -> build/lib.macosx-10.6-intel-3.6/bcolz
copying bcolz/toplevel.py -> build/lib.macosx-10.6-intel-3.6/bcolz
copying bcolz/ctable.py -> build/lib.macosx-10.6-intel-3.6/bcolz
copying bcolz/__init__.py -> build/lib.macosx-10.6-intel-3.6/bcolz
copying bcolz/utils.py -> build/lib.macosx-10.6-intel-3.6/bcolz
copying bcolz/chunked_eval.py -> build/lib.macosx-10.6-intel-3.6/bcolz
copying bcolz/defaults.py -> build/lib.macosx-10.6-intel-3.6/bcolz
copying bcolz/attrs.py -> build/lib.macosx-10.6-intel-3.6/bcolz
copying bcolz/py2help.py -> build/lib.macosx-10.6-intel-3.6/bcolz
copying bcolz/arrayprint.py -> build/lib.macosx-10.6-intel-3.6/bcolz
creating build/lib.macosx-10.6-intel-3.6/bcolz/tests
copying bcolz/tests/test_ndcarray.py -> build/lib.macosx-10.6-intel-3.6/bcolz/tests
copying bcolz/tests/test_carray_objects.py -> build/lib.macosx-10.6-intel-3.6/bcolz/tests
copying bcolz/tests/test_attrs.py -> build/lib.macosx-10.6-intel-3.6/bcolz/tests
copying bcolz/tests/__init__.py -> build/lib.macosx-10.6-intel-3.6/bcolz/tests
copying bcolz/tests/all.py -> build/lib.macosx-10.6-intel-3.6/bcolz/tests
copying bcolz/tests/common.py -> build/lib.macosx-10.6-intel-3.6/bcolz/tests
copying bcolz/tests/test_queries.py -> build/lib.macosx-10.6-intel-3.6/bcolz/tests
copying bcolz/tests/test_ctable.py -> build/lib.macosx-10.6-intel-3.6/bcolz/tests
copying bcolz/tests/test_carray.py -> build/lib.macosx-10.6-intel-3.6/bcolz/tests
copying bcolz/carray_ext.pxd -> build/lib.macosx-10.6-intel-3.6/bcolz
running build_ext
skipping 'bcolz/carray_ext.c' Cython extension (up-to-date)
building 'bcolz.carray_ext' extension
creating build/temp.macosx-10.6-intel-3.6
creating build/temp.macosx-10.6-intel-3.6/bcolz
creating build/temp.macosx-10.6-intel-3.6/c-blosc
creating build/temp.macosx-10.6-intel-3.6/c-blosc/blosc
creating build/temp.macosx-10.6-intel-3.6/c-blosc/internal-complibs
creating build/temp.macosx-10.6-intel-3.6/c-blosc/internal-complibs/lz4-r119
creating build/temp.macosx-10.6-intel-3.6/c-blosc/internal-complibs/snappy-1.1.1
creating build/temp.macosx-10.6-intel-3.6/c-blosc/internal-complibs/zlib-1.2.8
clang++ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=libc++ -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -Ibcolz -Ic-blosc/blosc -Ic-blosc/internal-complibs/snappy-1.1.1 -Ic-blosc/internal-complibs/lz4-r119 -Ic-blosc/internal-complibs/zlib-1.2.8 -I/Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c bcolz/carray_ext.c -o build/temp.macosx-10.6-intel-3.6/bcolz/carray_ext.o -std=libc++
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
error: invalid value 'libc++' in '-std=libc++'
note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard
note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard
note: use 'c++11' for 'ISO C++ 2011 with amendments' standard
note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard
note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard
note: use 'c++17' for 'ISO C++ 2017 with amendments' standard
note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard
note: use 'c++2a' for 'Working draft for ISO C++ 2020' standard
note: use 'gnu++2a' for 'Working draft for ISO C++ 2020 with GNU extensions' standard
error: command 'clang++' failed with exit status 1

----------------------------------------
Command "/Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/n5/yqd1_zh15xz55dy2qzsjxzfr0000gn/T/pip-build-beuburui/bcolz/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/n5/yqd1_zh15xz55dy2qzsjxzfr0000gn/T/pip-b2puzll6-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/bin/../include/site/python3.6/bcolz" failed with error code 1 in /private/var/folders/n5/yqd1_zh15xz55dy2qzsjxzfr0000gn/T/pip-build-beuburui/bcolz/

编辑 3:

这里是 pip install 命令正在安装的包。

Collecting zipline
Requirement already satisfied: Mako>=1.0.1 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: alembic>=0.7.7 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: decorator>=4.0.0 in ./venv/lib/python3.6/site-packages (from zipline)
Collecting bcolz<1,>=0.12.1 (from zipline)
Using cached https://files.pythonhosted.org/packages/6c/8b/1ffa01f872cac36173c5eb95b58c01040d8d25f1b242c48577f4104cd3ab/bcolz-0.12.1.tar.gz
Requirement already satisfied: toolz>=0.8.2 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: cyordereddict>=0.2.2 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: intervaltree>=2.1.0 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: requests-file>=1.4.1 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: six>=1.10.0 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: setuptools>18.0 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: MarkupSafe>=0.23 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: requests>=2.9.1 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: numpy>=1.11.1 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: multipledispatch>=0.4.8 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: networkx<2.0,>=1.9.1 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: sqlalchemy>=1.0.8 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: Cython>=0.25.2 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: sortedcontainers>=1.4.4 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: click>=4.0.0 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: pandas-datareader>=0.2.1 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: python-dateutil>=2.4.2 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: patsy>=0.4.0 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: pip>=7.1.0 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: contextlib2>=0.4.0 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: empyrical>=0.5.0 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: statsmodels>=0.6.1 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: Logbook>=0.12.5 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: bottleneck>=1.0.0 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: lru-dict>=1.1.4 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: pandas<=0.22,>=0.18.1 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: trading-calendars>=1.0.1 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: scipy>=0.17.1 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: pytz>=2016.4 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: numexpr>=2.6.1 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: tables>=3.3.0 in ./venv/lib/python3.6/site-packages (from zipline)
Requirement already satisfied: python-editor>=0.3 in ./venv/lib/python3.6/site-packages (from alembic>=0.7.7->zipline)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.6/site-packages (from requests>=2.9.1->zipline)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in ./venv/lib/python3.6/site-packages (from requests>=2.9.1->zipline)
Requirement already satisfied: idna<2.9,>=2.5 in ./venv/lib/python3.6/site-packages (from requests>=2.9.1->zipline)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./venv/lib/python3.6/site-packages (from requests>=2.9.1->zipline)
Requirement already satisfied: wrapt in ./venv/lib/python3.6/site-packages (from pandas-datareader>=0.2.1->zipline)
Requirement already satisfied: lxml in ./venv/lib/python3.6/site-packages (from pandas-datareader>=0.2.1->zipline)
Building wheels for collected packages: bcolz

编辑 4:

error: invalid argument '-std=gnu++11' not allowed with 'C'
error: command 'gcc' failed with exit status 1

----------------------------------------
Command "/Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/n5/yqd1_zh15xz55dy2qzsjxzfr0000gn/T/pip-build-leowqoun/bcolz/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/n5/yqd1_zh15xz55dy2qzsjxzfr0000gn/T/pip-r5iqy2oy-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/bin/../include/site/python3.6/bcolz" failed with error code 1 in /private/var/folders/n5/yqd1_zh15xz55dy2qzsjxzfr0000gn/T/pip-build-leowqoun/bcolz/

最佳答案

这对我有用:

> export DISABLE_BCOLZ_AVX2=true

然后再试一次

pip install zipline

我的环境:
Ubuntu 20.04
Python 3.6 & 3.6 开发

引用: https://github.com/Blosc/bcolz/issues/398#issuecomment-698748897

关于python - zipline 安装错误 : failed building wheel for bcolz,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53969032/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com