PIP无法安装scipy软件包(numpy.distutils中没有名为“numpy.distutils.\u msvccompiler”的模块;正在从distutils中尝试)

2024-09-27 07:33:25 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用pip构建我的应用程序,并使用命令在CloudFoundry上安装它 pip download -r requirements.txt --no-binary=:all: -d vendor和我的requirementns.txt文件包含以下条目 pandas==1.0.3 scikit-learn==0.22.2.post1 cx-Oracle==7.3.0

我得到的错误与这些问题类似:我尝试了这些问题中提到的解决方案,但当我运行上述命令时,它将从internet获取scipy并尝试构建它,而不是使用已安装的版本,我得到以下错误

Python SciPy giving error with pip install scipy

python scipy not able to install

Installing SciPy with pip

Installing NumPy and SciPy on 64-bit Windows (with Pip)

Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\program files\python\python37\python.exe' 'C:\Users\U631156\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\U631156\AppData\Local\Temp\tmpsek9avf5'
         cwd: C:\Users\U631156\AppData\Local\Temp\pip-download-zbglo57x\scipy
    Complete output (216 lines):
    lapack_opt_info:
    lapack_mkl_info:
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries mkl_rt not found in ['c:\\program files\\python\\python37\\lib', 'C:\\', 'c:\\program files\\python\\python37\\libs', 'C:\\PROGRAMDATA\\Anaconda3\\Library\\lib']
      NOT AVAILABLE

    openblas_lapack_info:
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries openblas not found in ['c:\\program files\\python\\python37\\lib', 'C:\\', 'c:\\program files\\python\\python37\\libs', 'C:\\PROGRAMDATA\\Anaconda3\\Library\\lib']
    get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
    customize GnuFCompiler
    Could not locate executable g77
    Could not locate executable f77
    customize IntelVisualFCompiler
    Could not locate executable ifort
    Could not locate executable ifl
    customize AbsoftFCompiler
    Could not locate executable f90
    customize CompaqVisualFCompiler
    Could not locate executable DF
    customize IntelItaniumVisualFCompiler
    Could not locate executable efl
    customize Gnu95FCompiler
    Could not locate executable gfortran
    Could not locate executable f95
    customize G95FCompiler
    Could not locate executable g95
    customize IntelEM64VisualFCompiler
    customize IntelEM64TFCompiler
    Could not locate executable efort
    Could not locate executable efc
    customize PGroupFlangCompiler
    Could not locate executable flang
    don't know how to compile Fortran code on platform 'nt'
      NOT AVAILABLE

    openblas_clapack_info:
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries openblas,lapack not found in ['c:\\program files\\python\\python37\\lib', 'C:\\', 'c:\\program files\\python\\python37\\libs', 'C:\\PROGRAMDATA\\Anaconda3\\Library\\lib']
      NOT AVAILABLE

    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries tatlas,tatlas not found in c:\program files\python\python37\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in c:\program files\python\python37\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries tatlas,tatlas not found in C:\
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in C:\
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries tatlas,tatlas not found in c:\program files\python\python37\libs
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in c:\program files\python\python37\libs
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries tatlas,tatlas not found in C:\PROGRAMDATA\Anaconda3\Library\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in C:\PROGRAMDATA\Anaconda3\Library\lib
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE

    atlas_3_10_info:
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries satlas,satlas not found in c:\program files\python\python37\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in c:\program files\python\python37\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries satlas,satlas not found in C:\
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in C:\
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries satlas,satlas not found in c:\program files\python\python37\libs
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in c:\program files\python\python37\libs
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries satlas,satlas not found in C:\PROGRAMDATA\Anaconda3\Library\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in C:\PROGRAMDATA\Anaconda3\Library\lib
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
      NOT AVAILABLE

    atlas_threads_info:
    Setting PTATLAS=ATLAS
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries ptf77blas,ptcblas,atlas not found in c:\program files\python\python37\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in c:\program files\python\python37\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries ptf77blas,ptcblas,atlas not found in C:\
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in C:\
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries ptf77blas,ptcblas,atlas not found in c:\program files\python\python37\libs
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in c:\program files\python\python37\libs
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries ptf77blas,ptcblas,atlas not found in C:\PROGRAMDATA\Anaconda3\Library\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in C:\PROGRAMDATA\Anaconda3\Library\lib
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE

    atlas_info:
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries f77blas,cblas,atlas not found in c:\program files\python\python37\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in c:\program files\python\python37\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries f77blas,cblas,atlas not found in C:\
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in C:\
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries f77blas,cblas,atlas not found in c:\program files\python\python37\libs
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in c:\program files\python\python37\libs
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries f77blas,cblas,atlas not found in C:\PROGRAMDATA\Anaconda3\Library\lib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack_atlas not found in C:\PROGRAMDATA\Anaconda3\Library\lib
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE

    lapack_info:
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries lapack not found in ['c:\\program files\\python\\python37\\lib', 'C:\\', 'c:\\program files\\python\\python37\\libs', 'C:\\PROGRAMDATA\\Anaconda3\\Library\\lib']
      NOT AVAILABLE

    lapack_src_info:
      NOT AVAILABLE

      NOT AVAILABLE

    setup.py:420: UserWarning: Unrecognized setuptools command ('dist_info --egg-base C:\Users\U631156\AppData\Local\Temp\pip-modern-metadata-s3lkkarc'), proceeding with generating Cython sources and expanding templates
      ' '.join(sys.argv[1:])))
    Running from scipy source directory.
    C:\Users\U631156\AppData\Local\Temp\pip-build-env-aeu9csex\overlay\Lib\site-packages\numpy\distutils\system_info.py:624: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    C:\Users\U631156\AppData\Local\Temp\pip-build-env-aeu9csex\overlay\Lib\site-packages\numpy\distutils\system_info.py:624: 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.
      self.calc_info()
    C:\Users\U631156\AppData\Local\Temp\pip-build-env-aeu9csex\overlay\Lib\site-packages\numpy\distutils\system_info.py:624: 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.
      self.calc_info()
    Traceback (most recent call last):
      File "C:\Users\U631156\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\pep517\_in_process.py", line 257, in <module>
        main()
      File "C:\Users\U631156\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\pep517\_in_process.py", line 240, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "C:\Users\U631156\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\pep517\_in_process.py", line 110, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "C:\Users\U631156\AppData\Local\Temp\pip-build-env-aeu9csex\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in prepare_metadata_for_build_wheel
        self.run_setup()
      File "C:\Users\U631156\AppData\Local\Temp\pip-build-env-aeu9csex\overlay\Lib\site-packages\setuptools\build_meta.py", line 250, in run_setup
        self).run_setup(setup_script=setup_script)
      File "C:\Users\U631156\AppData\Local\Temp\pip-build-env-aeu9csex\overlay\Lib\site-packages\setuptools\build_meta.py", line 143, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 540, in <module>
        setup_package()
      File "setup.py", line 536, in setup_package
        setup(**metadata)
      File "C:\Users\U631156\AppData\Local\Temp\pip-build-env-aeu9csex\overlay\Lib\site-packages\numpy\distutils\core.py", line 135, in setup
        config = configuration()
      File "setup.py", line 435, in configuration
        raise NotFoundError(msg)
    numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python\python37\python.exe' 'C:\Users\U631156\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\U631156\AppData\Local\Temp\tmpsek9avf5' Check the logs for full command output.

Tags: noinfromnumpylibrariesnotnamedmodule

热门问题