Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
108 views
in Technique[技术] by (71.8m points)

python library scs wheel is failing to build

While trying to install the module PyPortfolioOpt, it failed because the Ecos and scs modules failed to build. I fixed the issue with Ecos by getting visual studio build tools but scs still keeps failing. I'm using a conda environment with python 3.8 and I tried conda install but it couldn't find the package in the default channels. Here is the error message:

C:UsersFranklin Joe>pip install scs
Collecting scs
  Using cached scs-2.1.2.tar.gz (3.5 MB)
Requirement already satisfied: numpy>=1.7 in c:programdataanaconda3libsite-packages (from scs) (1.19.2)
Requirement already satisfied: scipy>=0.13.2 in c:programdataanaconda3libsite-packages (from scs) (1.5.2)
Building wheels for collected packages: scs
  Building wheel for scs (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:ProgramDataAnaconda3python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Franklin Joe\AppData\Local\Temp\pip-install-ifm96i5v\scs\setup.py'"'"'; __file__='"'"'C:\Users\Franklin Joe\AppData\Local\Temp\pip-install-ifm96i5v\scs\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:UsersFranklin JoeAppDataLocalTemppip-wheel-z7f66io1'
       cwd: C:UsersFranklin JoeAppDataLocalTemppip-install-ifm96i5vscs
  Complete output (79 lines):
  Namespace(blas64=False, extraverbose=False, float32=False, gpu=False, int32=False, scs=False)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating buildlib.win-amd64-3.8
  creating buildlib.win-amd64-3.8scs
  copying src\__init__.py -> buildlib.win-amd64-3.8scs
  running build_ext
  blas_mkl_info:
      libraries = ['mkl_rt']
      library_dirs = ['C:/ProgramData/Anaconda3\Library\lib']
      define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
      include_dirs = ['C:/ProgramData/Anaconda3\Library\include']
  blas_opt_info:
      libraries = ['mkl_rt']
      library_dirs = ['C:/ProgramData/Anaconda3\Library\lib']
      define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
      include_dirs = ['C:/ProgramData/Anaconda3\Library\include']
  lapack_mkl_info:
      libraries = ['mkl_rt']
      library_dirs = ['C:/ProgramData/Anaconda3\Library\lib']
      define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
      include_dirs = ['C:/ProgramData/Anaconda3\Library\include']
  lapack_opt_info:
      libraries = ['mkl_rt']
      library_dirs = ['C:/ProgramData/Anaconda3\Library\lib']
      define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
      include_dirs = ['C:/ProgramData/Anaconda3\Library\include']
  Could not locate executable g77
  Could not locate executable f77
  Could not locate executable ifort
  Could not locate executable ifl
  Could not locate executable f90
  Could not locate executable DF
  Could not locate executable efl
  Could not locate executable gfortran
  Could not locate executable f95
  Could not locate executable g95
  Could not locate executable efort
  Could not locate executable efc
  Could not locate executable flang
  don't know how to compile Fortran code on platform 'nt'
  C:ProgramDataAnaconda3libsite-packages
umpydistutilssystem_info.py:1914: UserWarning:
      Optimized (vendor) Blas libraries are not found.
      Falls back to netlib Blas library which has worse performance.
      A better performance should be easily gained by switching
      Blas library.
    if self._calc_info(blas):
  C:ProgramDataAnaconda3libsite-packages
umpydistutilssystem_info.py:1914: UserWarning:
      Blas (http://www.netlib.org/blas/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [blas]) or by setting
      the BLAS environment variable.
    if self._calc_info(blas):
  C:ProgramDataAnaconda3libsite-packages
umpydistutilssystem_info.py:1914: UserWarning:
      Blas (http://www.netlib.org/blas/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [blas_src]) or by setting
      the BLAS_SRC environment variable.
    if self._calc_info(blas):
  C:ProgramDataAnaconda3libsite-packages
umpydistutilssystem_info.py:1748: UserWarning:
      Lapack (http://www.netlib.org/lapack/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [lapack]) or by setting
      the LAPACK environment variable.
    return getattr(self, '_calc_info_{}'.format(name))()
  C:ProgramDataAnaconda3libsite-packages
umpydistutilssystem_info.py:1748: UserWarning:
      Lapack (http://www.netlib.org/lapack/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [lapack_src]) or by setting
      the LAPACK_SRC environment variable.
    return getattr(self, '_calc_info_{}'.format(name))()
  cl : Command line warning D9002 : ignoring unknown option '-O3'
  scsmodule.c
  c:programdataanaconda3includepyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
  error: Command "C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023inHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DCTRLC=1 -DDLONG=1 -DCOPYAMATRIX -Iscs/include -Iscs/linsys -Iscs/linsys/cpu/direct/ -Iscs/linsys/external/amd -Iscs/linsys/external/dqlql -IC:ProgramDataAnaconda3libsite-packages
umpycoreinclude -IC:ProgramDataAnaconda3include -IC:ProgramDataAnaconda3include -IC:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023include /Tcsrc/scsmodule.c /Fobuildemp.win-amd64-3.8Releasesrc/scsmodule.obj -O3" failed with exit status 2
  {}
  {}
  ----------------------------------------
  ERROR: Failed building wheel for scs
  Running setup.py clean for scs
Failed to build scs
Installing collected packages: scs
    Running setup.py install for scs ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:ProgramDataAnaconda3python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Franklin Joe\AppData\Local\Temp\pip-install-ifm96i5v\scs\setup.py'"'"'; __file__='"'"'C:\Users\Franklin Joe\AppData\Local\Temp\pip-install-ifm96i5v\scs\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersFranklin JoeAppDataLocalTemppip-record-tqjx263cinstall-record.txt' --single-version-externally-managed --compile --install-headers 'C:ProgramDataAnaconda3Includescs'
         cwd: C:UsersFranklin JoeAppDataLocalTemppip-install-ifm96i5vscs
    Complete output (79 lines):
    Namespace(blas64=False, extraverbose=False, float32=False, gpu=False, int32=False, scs=False)
    running install
    running build
    running build_py
    creating build
    creating buildlib.win-amd64-3.8
    creating buildlib.win-amd64-3.8scs
    copying src\__init__.py -> buildlib.win-amd64-3.8scs
    running build_ext
    blas_mkl_info:
        libraries = ['mkl_rt']
        library_dirs = ['C:/ProgramData/Anaconda3\Library\lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['C:/ProgramData/Anaconda3\Library\include']
    blas_opt_info:
        libraries = ['mkl_rt']
        library_dirs = ['C:/ProgramData/Anaconda3\Library\lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['C:/ProgramData/Anaconda3\Library\include']
    lapack_mkl_info:
        libraries = ['mkl_rt']
        library_dirs = ['C:/ProgramData/Anaconda3\Library\lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['C:/ProgramData/Anaconda3\Library\include']
    lapack_opt_info:
        libraries = ['mkl_rt']
        library_dirs = ['C:/ProgramData/Anaconda3\Library\lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['C:/ProgramData/Anaconda3\Library\include']
    Could not locate executable g77
    Could not locate executable f77
    Could not locate executable ifort
    Could not locate executable ifl
    Could not locate executable f90
    Could not locate executable DF
    Could not locate executable efl
    Could not locate executable gfortran
    Could not locate executable f95
    Could not locate executable g95
    Could not locate executable efort
    Could not locate executable efc
    Could not locate executable flang
    don't know how to compile Fortran code on platform 'nt'
    C:ProgramDataAnaconda3libsite-packages
umpydistutilssystem_info.py:1914: UserWarning:
        Optimized (vendor) Blas libraries are not found.
        Falls back to netlib Blas library which has worse performance.
        A better performance should be easily gained by switching
        Blas library.
      if self._calc_info(blas):
    C:ProgramDataAnaconda3libsite-packages
umpydistutilssystem_info.py:1914: UserWarning:
        Blas (http://www.netlib.org/blas/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [blas]) or by setting
        the BLAS environment variable.
      if self._calc_info(blas):
    C:ProgramDataAnaconda3libsite-packages
umpydistutilssystem_info.py:1914: UserWarning:
        Blas (http://www.netlib.org/blas/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [blas_src]) or by setting
        the BLAS_SRC environment variable.
      if self._calc_info(blas):
    C:ProgramDataAnaconda3libsite-packages
umpydistutilssystem_info.py:1748: UserWarning:
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
      return getattr(self, '_calc_info_{}'.format(name))()
    C:ProgramDataAnaconda3libsite-packages
umpydistutilssystem_info.py:1748: UserWarning:
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
      return getattr(self, '_calc_info_{}'.format(name))()
    cl : Command line warning D9002 : ignoring unknown option '-O3'
    scsmodule.c
    c:programdataanaconda3includepyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
    error: Command "C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023inHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DCTRLC=1 -DDLONG=1 -DCOPYAMATRIX -Iscs/include -Iscs/linsys -Iscs/linsys/cpu/direct/ -Iscs/linsys/external/amd -Iscs/linsys/external/dqlql -IC:ProgramDataAnaconda3libsite-packages
umpycoreinclude -IC:ProgramDataAnaconda3include -IC:ProgramDataAnaconda3include -IC:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023include /Tcsrc/scsmodule.c /Fobuildemp.win-amd64-3.8Releasesrc/scsmodule.obj -O3" failed with exit status 2
    {}
    {}
    ------------------------------

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...