马春杰杰 Exit Reader Mode

Apex is not installed | Linux下正确安装apex

pip安装apex报错:

  don't know how to compile Fortran code on platform 'posix'
  warning: build_ext: f77_compiler=None is not available.
  
  building 'apexpy.fortranapex' extension
  
  ########### EXT COMPILER OPTIMIZATION ###########
  Platform      :
    Architecture: x64
    Compiler    : gcc
  
  CPU baseline  :
    Requested   : 'min'
    Enabled     : SSE SSE2 SSE3
    Flags       : -msse -msse2 -msse3
    Extra checks: none
  
  CPU dispatch  :
    Requested   : 'max -xop -fma4'
    Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_SKX AVX512_CNL
    Generated   : none
  CCompilerOpt.cache_flush[809] : write cache to path -> /tmp/pip-install-7lzj2i8d/apexpy_7378e65f9d45405891a7ada46915e974/build/temp.linux-x86_64-3.7/ccompiler_opt_cache_ext.py
  error: extension 'apexpy.fortranapex' has Fortran sources but no Fortran compiler found
  ----------------------------------------
  ERROR: Failed building wheel for apexpy
Failed to build apexpy
ERROR: Could not build wheels for apexpy, which is required to install pyproject.toml-based projects

解决方法:

git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --disable-pip-version-check --no-cache-dir ./

本文最后更新于2022年4月5日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!