开发者社区> 问答> 正文

用于Apache Airflow ML框架设置的Python 3.6虚拟环境中的psutil软件包部

我正在尝试在Mac OS的Python虚拟环境中安装基于Apache Airflow的机器学习框架。该ML框架基于Apache Airflow 1.9版。为此,我已经配置了Python 3.6虚拟环境。但是,由于以下错误,ML框架安装和设置失败。你们中的任何人是否在Apache Airflow设置或基于Python 3.6的虚拟环境中遇到类似的错误?

Running setup.py install for psutil ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/gokulalex/airflow/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-install-ye9ohe71/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-install-ye9ohe71/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-record-anu_rweq/install-record.txt --single-version-externally-managed --compile --install-headers /Users/gokulalex/airflow/bin/../include/site/python3.6/psutil
         cwd: /private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-install-ye9ohe71/psutil/
    Complete output (45 lines):
    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/psutil
    copying psutil/_pswindows.py -> build/lib.macosx-10.6-intel-3.6/psutil
    copying psutil/_common.py -> build/lib.macosx-10.6-intel-3.6/psutil
    copying psutil/__init__.py -> build/lib.macosx-10.6-intel-3.6/psutil
    copying psutil/_psosx.py -> build/lib.macosx-10.6-intel-3.6/psutil
    copying psutil/_psbsd.py -> build/lib.macosx-10.6-intel-3.6/psutil
    copying psutil/_pslinux.py -> build/lib.macosx-10.6-intel-3.6/psutil
    copying psutil/_compat.py -> build/lib.macosx-10.6-intel-3.6/psutil
    copying psutil/_psposix.py -> build/lib.macosx-10.6-intel-3.6/psutil
    copying psutil/_pssunos.py -> build/lib.macosx-10.6-intel-3.6/psutil
    creating build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/runner.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/test_misc.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/test_posix.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/test_linux.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/test_sunos.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/__init__.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/test_process.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/test_bsd.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/test_system.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/test_osx.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/test_memory_leaks.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    copying psutil/tests/test_windows.py -> build/lib.macosx-10.6-intel-3.6/psutil/tests
    running build_ext
    building 'psutil._psutil_osx' extension
    creating build/temp.macosx-10.6-intel-3.6
    creating build/temp.macosx-10.6-intel-3.6/psutil
    creating build/temp.macosx-10.6-intel-3.6/psutil/arch
    creating build/temp.macosx-10.6-intel-3.6/psutil/arch/osx
    /usr/local/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=442 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c psutil/_psutil_osx.c -o build/temp.macosx-10.6-intel-3.6/psutil/_psutil_osx.o
    /usr/local/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=442 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c psutil/_psutil_common.c -o build/temp.macosx-10.6-intel-3.6/psutil/_psutil_common.o
    /usr/local/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=442 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c psutil/arch/osx/process_info.c -o build/temp.macosx-10.6-intel-3.6/psutil/arch/osx/process_info.o
    /usr/local/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-3.6/psutil/_psutil_osx.o build/temp.macosx-10.6-intel-3.6/psutil/_psutil_common.o build/temp.macosx-10.6-intel-3.6/psutil/arch/osx/process_info.o -o build/lib.macosx-10.6-intel-3.6/psutil/_psutil_osx.cpython-36m-darwin.so -framework CoreFoundation -framework IOKit
    ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
    ld: warning: text-based stub file /System/Library/Frameworks//IOKit.framework/IOKit.tbd and library file /System/Library/Frameworks//IOKit.framework/IOKit are out of sync. Falling back to library file for linking.
    ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
    ld: warning: ignoring file /usr/local/Cellar/llvm@4/4.0.1_1/bin/../lib/clang/4.0.1/lib/darwin/libclang_rt.osx.a, missing required architecture i386 in file /usr/local/Cellar/llvm@4/4.0.1_1/bin/../lib/clang/4.0.1/lib/darwin/libclang_rt.osx.a (2 slices)
    ld: in '/usr/local/lib/libunwind.dylib', file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libunwind.dylib for architecture i386
    clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command '/usr/local/bin/clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/gokulalex/airflow/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-install-ye9ohe71/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-install-ye9ohe71/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/79/sh378bcd1n15fyw44lvjnml40000gn/T/pip-record-anu_rweq/install-record.txt --single-version-externally-managed --compile --install-headers /Users/gokulalex/airflow/bin/../include/site/python3.6/psutil Check the logs for full command output.

展开
收起
祖安文状元 2020-02-23 16:16:57 1960 0
2 条回答
写回答
取消 提交回答
  • Airflow的安装流程与依赖有问题

    2020-03-14 14:15:38
    赞同 展开评论 打赏
  • 我以前没有收到过此错误,但似乎您可能缺少一些对此重要的c标头。另外,请检查您的气流安装,以查看是否丢失。通过调试日志,此错误似乎与Python无关

    2020-02-23 16:17:08
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载