python - CondaEnvException : Pip failed. 尝试使用 .yml

我正在尝试使用 .yml 文件在 conda 中创建一个环境。这是我运行的命令,

git clone https://github.com/fastai/fastai
cd fastai
conda env create -f environment.yml

最后一条命令给出了错误。一切正常,直到某一 pip ,然后突然间我明白了:

Pip subprocess error:
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\me\Anaconda3\envs\fastai\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-f93i4zuc\\scikit-misc\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-f93i4zuc\\scikit-misc\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Admin\AppData\Local\Temp\pip-wheel-0yqpfbub'
       cwd: C:\Users\Admin\AppData\Local\Temp\pip-install-f93i4zuc\scikit-misc\
  Complete output (123 lines):
  blas_opt_info:
  blas_mkl_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries mkl_rt not found in ['C:/Users/me/Anaconda3/envs/fastai\\Library\\lib']
    NOT AVAILABLE

  blis_info:
    libraries blis not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
    NOT AVAILABLE

  openblas_info:
    libraries openblas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
  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

  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
    libraries tatlas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
    NOT AVAILABLE

  atlas_3_10_blas_info:
    libraries satlas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
    NOT AVAILABLE

  atlas_blas_threads_info:
  Setting PTATLAS=ATLAS
    libraries ptf77blas,ptcblas,atlas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
    NOT AVAILABLE

  atlas_blas_info:
    libraries f77blas,cblas,atlas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
    NOT AVAILABLE

  accelerate_info:
    NOT AVAILABLE

  C:\Users\me\Anaconda3\envs\fastai\lib\site-packages\numpy\distutils\system_info.py:1896: 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):
  blas_info:
    libraries blas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
    NOT AVAILABLE

  C:\Users\me\Anaconda3\envs\fastai\lib\site-packages\numpy\distutils\system_info.py:1896: 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):
  blas_src_info:
    NOT AVAILABLE

  C:\Users\me\Anaconda3\envs\fastai\lib\site-packages\numpy\distutils\system_info.py:1896: 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):
    NOT AVAILABLE

  running bdist_wheel
  running build
  running config_cc
  unifing config_cc, config, build_clib, build_ext, build commands --compiler options
  running config_fc
  unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
  running build_src
  build_src
  building py_modules sources
  building library "floess" sources
  building extension "skmisc.loess._loess" sources
  building data_files sources
  build_src: building npy-pkg config files
  running build_py
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\skmisc
  copying skmisc\setup.py -> build\lib.win-amd64-3.6\skmisc
  copying skmisc\_version.py -> build\lib.win-amd64-3.6\skmisc
  copying skmisc\__config__.py -> build\lib.win-amd64-3.6\skmisc
  copying skmisc\__init__.py -> build\lib.win-amd64-3.6\skmisc
  copying build\src.win-amd64-3.6\skmisc\__config__.py -> build\lib.win-amd64-3.6\skmisc
  creating build\lib.win-amd64-3.6\skmisc\loess
  copying skmisc\loess\setup.py -> build\lib.win-amd64-3.6\skmisc\loess
  copying skmisc\loess\__init__.py -> build\lib.win-amd64-3.6\skmisc\loess
  creating build\lib.win-amd64-3.6\skmisc\loess\tests
  copying skmisc\loess\tests\test_loess.py -> build\lib.win-amd64-3.6\skmisc\loess\tests
  copying skmisc\loess\tests\__init__.py -> build\lib.win-amd64-3.6\skmisc\loess\tests
  UPDATING build\lib.win-amd64-3.6\skmisc/_version.py
  set build\lib.win-amd64-3.6\skmisc/_version.py to '0.1.3'
  running build_clib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
  customize MSVCCompiler using build_clib
  building 'floess' library
  error: library floess has Fortran sources but no Fortran compiler found
  ----------------------------------------
  ERROR: Failed building wheel for scikit-misc
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\me\Anaconda3\envs\fastai\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-f93i4zuc\\scikit-misc\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-f93i4zuc\\scikit-misc\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Admin\AppData\Local\Temp\pip-record-l2a968qs\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\me\Anaconda3\envs\fastai\Include\scikit-misc'
         cwd: C:\Users\Admin\AppData\Local\Temp\pip-install-f93i4zuc\scikit-misc\
    Complete output (123 lines):
    blas_opt_info:
    blas_mkl_info:
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
      libraries mkl_rt not found in ['C:/Users/me/Anaconda3/envs/fastai\\Library\\lib']
      NOT AVAILABLE

    blis_info:
      libraries blis not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
      NOT AVAILABLE

    openblas_info:
      libraries openblas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
    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

    atlas_3_10_blas_threads_info:
    Setting PTATLAS=ATLAS
      libraries tatlas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
      NOT AVAILABLE

    atlas_3_10_blas_info:
      libraries satlas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
      NOT AVAILABLE

    atlas_blas_threads_info:
    Setting PTATLAS=ATLAS
      libraries ptf77blas,ptcblas,atlas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
      NOT AVAILABLE

    atlas_blas_info:
      libraries f77blas,cblas,atlas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
      NOT AVAILABLE

    accelerate_info:
      NOT AVAILABLE

    C:\Users\me\Anaconda3\envs\fastai\lib\site-packages\numpy\distutils\system_info.py:1896: 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):
    blas_info:
      libraries blas not found in ['C:\\Users\\me\\Anaconda3\\envs\\fastai\\lib', 'C:\\', 'C:\\Users\\me\\Anaconda3\\envs\\fastai\\libs']
      NOT AVAILABLE

    C:\Users\me\Anaconda3\envs\fastai\lib\site-packages\numpy\distutils\system_info.py:1896: 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):
    blas_src_info:
      NOT AVAILABLE

    C:\Users\me\Anaconda3\envs\fastai\lib\site-packages\numpy\distutils\system_info.py:1896: 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):
      NOT AVAILABLE

    running install
    running build
    running config_cc
    unifing config_cc, config, build_clib, build_ext, build commands --compiler options
    running config_fc
    unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
    running build_src
    build_src
    building py_modules sources
    building library "floess" sources
    building extension "skmisc.loess._loess" sources
    building data_files sources
    build_src: building npy-pkg config files
    running build_py
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\skmisc
    copying skmisc\setup.py -> build\lib.win-amd64-3.6\skmisc
    copying skmisc\_version.py -> build\lib.win-amd64-3.6\skmisc
    copying skmisc\__config__.py -> build\lib.win-amd64-3.6\skmisc
    copying skmisc\__init__.py -> build\lib.win-amd64-3.6\skmisc
    copying build\src.win-amd64-3.6\skmisc\__config__.py -> build\lib.win-amd64-3.6\skmisc
    creating build\lib.win-amd64-3.6\skmisc\loess
    copying skmisc\loess\setup.py -> build\lib.win-amd64-3.6\skmisc\loess
    copying skmisc\loess\__init__.py -> build\lib.win-amd64-3.6\skmisc\loess
    creating build\lib.win-amd64-3.6\skmisc\loess\tests
    copying skmisc\loess\tests\test_loess.py -> build\lib.win-amd64-3.6\skmisc\loess\tests
    copying skmisc\loess\tests\__init__.py -> build\lib.win-amd64-3.6\skmisc\loess\tests
    UPDATING build\lib.win-amd64-3.6\skmisc/_version.py
    set build\lib.win-amd64-3.6\skmisc/_version.py to '0.1.3'
    running build_clib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
    customize MSVCCompiler using build_clib
    building 'floess' library
    error: library floess has Fortran sources but no Fortran compiler found
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\me\Anaconda3\envs\fastai\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-f93i4zuc\\scikit-misc\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-f93i4zuc\\scikit-misc\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Admin\AppData\Local\Temp\pip-record-l2a968qs\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\me\Anaconda3\envs\fastai\Include\scikit-misc' Check the logs for full command output.


CondaEnvException: Pip failed

这是.yml文件

name: fastai
channels:
- fastai
- pytorch
- defaults
- peterjc123
dependencies:
- scipy
- cuda90
- cudnn
- numpy
- pillow
- jpeg
- spacy
- zlib
- freetype
- libtiff
- bleach
- certifi
- cffi
- cycler
- decorator
- entrypoints
- expat
- html5lib
- icu
- ipykernel
- ipython
- ipython_genutils
- ipywidgets
- jedi
- jinja2
- jsonschema
- jupyter
- jupyter_client
- jupyter_console
- jupyter_core
#- conda-forge::jupyter_contrib_nbextensions
- libiconv
- libpng
- libsodium
- libxml2
- markupsafe
- matplotlib=2.2.3
- mistune
- mkl
- nbformat
- notebook
- numpy
- olefile
- openssl
- pandas
- pandocfilters
- path.py
- patsy
- pcre
- pexpect
- pickleshare
- pillow
- pip
- prompt_toolkit
- pycparser
- pygments
- pyparsing
- pyqt
- python>=3.6.0
- python-dateutil
- pytz
- pyzmq
- qt
- qtconsole
- scipy
- seaborn
- setuptools
- simplegeneric
- sip
- six
- sqlite
- statsmodels
- testfixtures
- testpath>=0.4.2
- tk
- tornado<5
- tqdm
- traitlets
- wcwidth
- wheel
- widgetsnbextension
- xz
- zeromq
- pytorch<0.4
- bcolz
- prompt_toolkit
#- pytest
- cython
- graphviz
- pip:
  - torchvision==0.1.9
  - opencv-python
  - isoweek
  - pandas_summary==0.0.5
  - torchtext==0.2.3
  - graphviz
  - sklearn_pandas
  - feather-format
  - plotnine
  - kaggle-cli
  - ipywidgets
  - nbconvert
  - PyHamcrest
  - pdpbox==0.1.0
  - scikit-misc

我已经尝试了以下操作,但仍然出现上述错误:

  • 卸载环境重试
  • 在所有环境中将 pip 更新为当前版本
  • 以管理员身份运行 Anaconda Powershell 提示符并重试

谁能帮忙解决这个问题。我不知道为什么会这样,也欢迎解释。

最佳答案

更新 conda 对我有用:

conda update -n base -c defaults conda

关于python - CondaEnvException : Pip failed. 尝试使用 .yml 文件在 conda 中创建环境时出现 pip 子进程错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62568247/

相关文章:

node.js - 如何在 Strapi 中创建不同的管理员角色

ios - UIView 作为@EnvironmentObject 的订阅者

android - 使用 Moshi 处理错误响应

rust - 我如何使字符串比闭包体生命周期更长?

python - 实现函数的优化和非优化版本的最简洁方法?

javascript - 如何使用 React 在客户端裁剪图像而不丢失分辨率

javascript - 为什么外部 javascript 文件不工作 Rails 6?

flutter - 无法在 flutter 中使用wifi包连接到wifi

reactjs - 应用多个动态过滤器

angular-cli - 每当我运行 npm run ng build-hin 时,我都会遇到错误