我正在尝试安装celerite软件包,但是我很难在apple m1 mac上安装它。终端输出如下。这是m1问题还是python-c问题?
~ > pip install celerite
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/UNKNOWN
sysconfig: /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Collecting celerite
Using cached celerite-0.4.0.tar.gz (1.3 MB)
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from celerite) (1.19.5)
Requirement already satisfied: pybind11 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from celerite) (2.6.2)
Using legacy 'setup.py install' for celerite, since package 'wheel' is not installed.
Installing collected packages: celerite
Running setup.py install for celerite ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/pip-install-ejzry3ds/celerite_7d3f74933971475894ddbc9a37f5d2d3/setup.py'"'"'; __file__='"'"'/private/var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/pip-install-ejzry3ds/celerite_7d3f74933971475894ddbc9a37f5d2d3/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/pip-record-eyjraeap/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/celerite
cwd: /private/var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/pip-install-ejzry3ds/celerite_7d3f74933971475894ddbc9a37f5d2d3/
Complete output (142 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.9
creating build/lib.macosx-10.9-x86_64-3.9/celerite
copying celerite/terms.py -> build/lib.macosx-10.9-x86_64-3.9/celerite
copying celerite/build.py -> build/lib.macosx-10.9-x86_64-3.9/celerite
copying celerite/timer.py -> build/lib.macosx-10.9-x86_64-3.9/celerite
copying celerite/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/celerite
copying celerite/celerite.py -> build/lib.macosx-10.9-x86_64-3.9/celerite
copying celerite/plot_setup.py -> build/lib.macosx-10.9-x86_64-3.9/celerite
copying celerite/modeling.py -> build/lib.macosx-10.9-x86_64-3.9/celerite
running egg_info
writing celerite.egg-info/PKG-INFO
writing dependency_links to celerite.egg-info/dependency_links.txt
writing requirements to celerite.egg-info/requires.txt
writing top-level names to celerite.egg-info/top_level.txt
reading manifest file 'celerite.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'celerite.egg-info/SOURCES.txt'
copying celerite/solver.cpp -> build/lib.macosx-10.9-x86_64-3.9/celerite
running build_ext
testing C++14/C++11 support
creating var
creating var/folders
creating var/folders/y9
creating var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp
creating var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c /var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmp6bm3jgjr.cpp -o var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmp6bm3jgjr.o -std=c++14
testing compiler flags
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c /var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmpw_0z5jvh.cpp -o var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmpw_0z5jvh.o -stdlib=libc++
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c /var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmpzofp_v4s.cpp -o var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmpzofp_v4s.o -fvisibility=hidden
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c /var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmp7n02kzyj.cpp -o var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmp7n02kzyj.o -Wno-unused-function
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c /var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmpaax51kgm.cpp -o var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmpaax51kgm.o -Wno-uninitialized
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c /var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmp9nw9zr5w.cpp -o var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmp9nw9zr5w.o -Wno-unused-local-typedefs
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c /var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmp5rqw4hd2.cpp -o var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmp5rqw4hd2.o -funroll-loops
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c /var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmpzv7s8yxb.cpp -o var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmpzv7s8yxb.o -march=native
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c /var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmpbedvthn6.cpp -o var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/tmpbedvthn6.o -mmacosx-version-min=10.9
building 'celerite.solver' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9/celerite
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Icpp/include -Icpp/lib/eigen_3.3.3 -I/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include -I/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c celerite/solver.cpp -o build/temp.macosx-10.9-x86_64-3.9/celerite/solver.o -DNODEBUG -DVERSION_INFO="0.4.0" -std=c++14 -stdlib=libc++ -fvisibility=hidden -Wno-unused-function -Wno-uninitialized -Wno-unused-local-typedefs -funroll-loops -march=native -mmacosx-version-min=10.9
In file included from celerite/solver.cpp:1:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/pybind11.h:45:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/attr.h:13:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/cast.h:13:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/pytypes.h:12:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/detail/common.h:124:
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:14:2: error: "Something's broken. UCHAR_MAX should be defined in limits.h."
#error "Something's broken. UCHAR_MAX should be defined in limits.h."
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:18:2: error: "Python's source code assumes C's unsigned char is an 8-bit type."
#error "Python's source code assumes C's unsigned char is an 8-bit type."
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:27:5: error: "Python.h requires that stdio.h define NULL."
# error "Python.h requires that stdio.h define NULL."
^
In file included from celerite/solver.cpp:1:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/pybind11.h:45:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/attr.h:13:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/cast.h:13:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/pytypes.h:12:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/detail/common.h:124:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:30:
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:73:64: error: use of undeclared identifier 'strchr'
char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);}
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:80:75: error: use of undeclared identifier 'strpbrk'
char* __libcpp_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);}
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:87:65: error: use of undeclared identifier 'strrchr'; did you mean 'strchr'?
char* __libcpp_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);}
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:75:13: note: 'strchr' declared here
const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:94:49: error: unknown type name 'size_t'
void* __libcpp_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);}
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:96:46: error: unknown type name 'size_t'
const void* memchr(const void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:98:46: error: unknown type name 'size_t'
void* memchr( void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:101:74: error: use of undeclared identifier 'strstr'; did you mean 'strchr'?
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:77:13: note: 'strchr' declared here
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:101:74: error: no matching function for call to 'strchr'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:77:13: note: candidate disabled: <no message provided>
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:101:81: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'const char *'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^~~~
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/string.h:77:32: note: passing argument to parameter '__s' here
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
In file included from celerite/solver.cpp:1:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/pybind11.h:45:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/attr.h:13:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/cast.h:13:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/pytypes.h:12:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pybind11/include/pybind11/detail/common.h:124:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:34:
In file included from /Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/stdlib.h:100:
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/math.h:769:12: error: no member named 'labs' in the global namespace; did you mean 'abs'?
return ::labs(__x);
~~^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/math.h:768:39: note: 'abs' declared here
inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/math.h:773:12: error: no member named 'llabs' in the global namespace
return ::llabs(__x);
~~^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/math.h:781:12: error: no member named 'fabsf' in the global namespace
return ::fabsf(__lcpp_x);
~~^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/math.h:785:12: error: no member named 'fabs' in the global namespace; did you mean 'abs'?
return ::fabs(__lcpp_x);
~~^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/math.h:768:39: note: 'abs' declared here
inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/math.h:790:12: error: no member named 'fabsl' in the global namespace
return ::fabsl(__lcpp_x);
~~^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/math.h:804:34: error: unknown type name 'ldiv_t'
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
^
/Library/Developer/Toolchains/swift-5.3.3-RELEASE.xctoolchain/usr/bin/../include/c++/v1/math.h:805:12: error: no member named 'ldiv' in the global namespace
return ::ldiv(__x, __y);
~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/pip-install-ejzry3ds/celerite_7d3f74933971475894ddbc9a37f5d2d3/setup.py'"'"'; __file__='"'"'/private/var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/pip-install-ejzry3ds/celerite_7d3f74933971475894ddbc9a37f5d2d3/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/y9/twfc9zz104bbyg90rrh3t23h0000gp/T/pip-record-eyjraeap/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/celerite Check the logs for full command output.
'''
1条答案
按热度按时间jm2pwxwz1#
检查是否满足所有要求
安装python后,需要以下依赖项才能构建celerite:
python中数学和线性代数的numpy,以及
pybind11用于python–c接口。
autograd(可选)用于计算celerite模型中的梯度。
检查您的计算机上是否有c/c编译器
欲了解更多信息,请访问https://celerite.readthedocs.io/en/stable/python/install/