..
Python 3.8 Pip Install Libsass Error
문제
개발 환경
os
macOS Montereyodoo
enterprise 14python
3.8.5pip
?
requirements.txt로 한 번에 라이브러리를 설치하는데 libsass
라이브러리에서 오류가 발생했다.
간혹 따로 설치하면 설치가 되는 경우가 있어서 따로 설치해봤는데 그래도 같은 오류가 발생했다.
$ pip install libsass==0.17.0
ERROR: Command errored out with exit status 1:
command: /Users/bobbohee/.pyenv/versions/3.8.5/envs/HY_STUDY_OENT14/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c7/syxfr_sd27373f0mlr8jgdz00000gn/T/pip-install-492okb4p/libsass_eca79e65293349719f3febf0b11cf96b/setup.py'"'"'; __file__='"'"'/private/var/folders/c7/syxfr_sd27373f0mlr8jgdz00000gn/T/pip-install-492okb4p/libsass_eca79e65293349719f3febf0b11cf96b/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/c7/syxfr_sd27373f0mlr8jgdz00000gn/T/pip-record-twtktl_8/install-record.txt --single-version-externally-managed --compile --install-headers /Users/bobbohee/.pyenv/versions/3.8.5/envs/HY_STUDY_OENT14/include/site/python3.8/libsass
cwd: /private/var/folders/c7/syxfr_sd27373f0mlr8jgdz00000gn/T/pip-install-492okb4p/libsass_eca79e65293349719f3febf0b11cf96b/
Complete output (92 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.15-x86_64-3.8
copying pysassc.py -> build/lib.macosx-10.15-x86_64-3.8
copying sass.py -> build/lib.macosx-10.15-x86_64-3.8
copying sassc.py -> build/lib.macosx-10.15-x86_64-3.8
copying sasstests.py -> build/lib.macosx-10.15-x86_64-3.8
creating build/lib.macosx-10.15-x86_64-3.8/sassutils
copying sassutils/__init__.py -> build/lib.macosx-10.15-x86_64-3.8/sassutils
copying sassutils/builder.py -> build/lib.macosx-10.15-x86_64-3.8/sassutils
copying sassutils/_compat.py -> build/lib.macosx-10.15-x86_64-3.8/sassutils
copying sassutils/distutils.py -> build/lib.macosx-10.15-x86_64-3.8/sassutils
copying sassutils/wsgi.py -> build/lib.macosx-10.15-x86_64-3.8/sassutils
running build_ext
building '_sass' extension
creating build/temp.macosx-10.15-x86_64-3.8
creating build/temp.macosx-10.15-x86_64-3.8/libsass
creating build/temp.macosx-10.15-x86_64-3.8/libsass/src
creating build/temp.macosx-10.15-x86_64-3.8/libsass/src/memory
clang++ -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I./libsass/include -I/Users/bobbohee/.pyenv/versions/3.8.5/envs/HY_STUDY_OENT14/include -I/Users/bobbohee/.pyenv/versions/3.8.5/include/python3.8 -c libsass/src/ast.cpp -o build/temp.macosx-10.15-x86_64-3.8/libsass/src/ast.o -c -O3 -fPIC -std=gnu++0x -Wall -Wno-parentheses -Werror=switch -stdlib=libc++ -mmacosx-version-min=10.7 -DLIBSASS_VERSION="3.5.5"
In file included from libsass/src/ast.cpp:2:
In file included from libsass/src/ast.hpp:14:
In file included from libsass/src/ast_fwd_decl.hpp:11:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/unordered_map:407:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__hash_table:18:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:317:9: error: no member named 'signbit' in the global namespace
using ::signbit;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:318:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:319:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
~~^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:749:12: note: 'finite' declared here
extern int finite(double)
^
In file included from libsass/src/ast.cpp:2:
In file included from libsass/src/ast.hpp:14:
In file included from libsass/src/ast_fwd_decl.hpp:11:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/unordered_map:407:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__hash_table:18:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:320:9: error: no member named 'isinf' in the global namespace
using ::isinf;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:321:9: error: no member named 'isnan' in the global namespace
using ::isnan;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:322:9: error: no member named 'isnormal' in the global namespace
using ::isnormal;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:323:7: error: no member named 'isgreater' in the global namespace; did you mean '::std::greater'?
using ::isgreater;
^~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:731:29: note: '::std::greater' declared here
struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool>
^
In file included from libsass/src/ast.cpp:2:
In file included from libsass/src/ast.hpp:14:
In file included from libsass/src/ast_fwd_decl.hpp:11:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/unordered_map:407:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__hash_table:18:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:324:7: error: no member named 'isgreaterequal' in the global namespace; did you mean '::std::greater_equal'?
using ::isgreaterequal;
^~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:760:29: note: '::std::greater_equal' declared here
struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
^
In file included from libsass/src/ast.cpp:2:
In file included from libsass/src/ast.hpp:14:
In file included from libsass/src/ast_fwd_decl.hpp:11:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/unordered_map:407:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__hash_table:18:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:325:9: error: no member named 'isless' in the global namespace
using ::isless;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:326:9: error: no member named 'islessequal' in the global namespace
using ::islessequal;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:327:9: error: no member named 'islessgreater' in the global namespace
using ::islessgreater;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:328:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
13 errors generated.
error: command 'clang++' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/bobbohee/.pyenv/versions/3.8.5/envs/HY_STUDY_OENT14/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c7/syxfr_sd27373f0mlr8jgdz00000gn/T/pip-install-492okb4p/libsass_eca79e65293349719f3febf0b11cf96b/setup.py'"'"'; __file__='"'"'/private/var/folders/c7/syxfr_sd27373f0mlr8jgdz00000gn/T/pip-install-492okb4p/libsass_eca79e65293349719f3febf0b11cf96b/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/c7/syxfr_sd27373f0mlr8jgdz00000gn/T/pip-record-twtktl_8/install-record.txt --single-version-externally-managed --compile --install-headers /Users/bobbohee/.pyenv/versions/3.8.5/envs/HY_STUDY_OENT14/include/site/python3.8/libsass Check the logs for full command output.
해결
참고한 글을 보니 꼭 0.17.0
버전이 아닌 0.20.1
버전을 사용해도 괜찮다는 얘기가 있어서, 0.20.1
버전으로 설치했더니 정상적으로 설치가 되었다.
(odoo를 실행시키니 정상적으로 동작했다.)
$ pip install libsass==0.20.1