CondaEnvException:Pip 失败。尝试使用 .yml 文件在 conda 中创建环境时出现 pip 子进程错误

2024-03-28

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

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

最后一个命令给了我错误。一切都工作正常,直到某一点,然后突然我得到了这个:

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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

CondaEnvException:Pip 失败。尝试使用 .yml 文件在 conda 中创建环境时出现 pip 子进程错误 的相关文章

  • Python包不安装子模块

    我在 dev 分支中创建了一个具有以下结构的包 在验证包安装正确之前不会合并到 main mypackage init py setup py requirements txt module py subpackage one init p
  • python中热图的层次聚类

    我有一个 NxM 矩阵 其值范围为 0 到 20 我可以使用 Matplotlib 和 pcolor 轻松获得热图 现在我想使用 scipy 应用层次聚类和树状图 我想重新排序每个维度 行和列 以显示哪些元素相似 根据聚类结果 如果矩阵是方
  • 带括号的上下文管理器

    我试图了解新的新内容带括号的上下文管理器Python 3 10 中的功能 新功能中的顶部项目here https docs python org 3 10 whatsnew 3 10 html 我的测试示例是尝试编写 with open f
  • 如何在 Django 管理中以表格格式显示添加模型?

    我刚刚开始使用 Django 编写我的第一个应用程序 为我的家庭设计的家务图表管理器 在本教程中 它向您展示了如何添加相关对象 http docs djangoproject com en dev intro tutorial02 cust
  • 创建一个打开文件并创建字典的函数

    我有一个正在处理的文件 我想创建一个读取文件并将内容放入字典中的函数 然后该字典需要通过 main 函数传递 这是主程序 它无法改变 我所做的一切都必须与主程序配合 def main sunspot dict file str raw in
  • 在 Python 3 中动态导入模块的问题

    我遇到的情况是 在我的 Python 3 项目中 在运行时必须包含某些模块 我在用着importlib import module为了这 第二次更新 我确实找到了一种方法来做一些接近我想要的事情 一些额外的代码可能会使我的一些链接稍微偏离一
  • 通过鼻子测试检查某个函数是否发出警告

    我正在使用编写单元测试nose http somethingaboutorange com mrl projects nose 0 11 2 我想检查函数是否引发警告 该函数使用warnings warn 这是很容易就能做到的事情吗 def
  • 将 matplotlib png 转换为 base64 以在 html 模板中查看

    背景 你好 我正在尝试制作一个简单的网络应用程序 按照教程计算阻尼振动方程 并将结果的 png 返回到 html 页面 然后将其转换为 Base64 字符串 Problem 该应用程序运行正常 只是在计算结果时返回损坏的图像图标 可能是因为
  • 十六进制数的按位异或

    我们如何在 Python 中对十六进制数进行异或 例如 我想要异或 ABCD and 12EF 答案应该是 B922 我使用了下面的代码 但它给出了错误的结果 xor two strings of different lengths def
  • 绘制“plot”而不是“scatter”时,图例选择会中断

    再会 这个问题是后续问题为什么图例选取仅适用于 ax twinx 而不适用于 ax https stackoverflow com q 60167378 9282844 下面提供的最小代码分别绘制了两条曲线ax1 and ax2 ax1 t
  • 可移植的非关系数据库

    我想尝试 尝试非关系数据库 最好的解决方案是 便携式 这意味着它不需要安装 理想情况下 只需将目录复制粘贴到某个地方即可使其工作 我不介意第一次使用时是否需要编辑一些配置文件或运行配置工具 可从 python 访问 适用于 Windows
  • 在加载“cv2”二进制扩展期间检测到递归

    我有一个小程序 在 pyinstaller 编译后返回 opencv 错误 但无需编译即可工作 我在 Windows 10 上使用 Python 3 8 10 Program 导入 pyautogui将 numpy 导入为 np导入CV2
  • 使用 Python 的文本中的词频但忽略停用词

    这给了我文本中单词的频率 fullWords re findall r w allText d defaultdict int for word in fullWords d word 1 finalFreq sorted d iterit
  • Pyinstaller --onefile 警告文件已存在但不应存在

    跑步时Pyinstaller onefile 并开始得到结果 exe 会出现多个弹出窗口 并显示以下警告 WARNING file already exists but should not C Users myuser AppData L
  • 有没有任何方法可以使用 openpyxl 获取 .xlsx 工作表中存在的行数和列数?

    有没有任何方法可以使用 openpyxl 获取 xlsx 工作表中存在的行数和列数 在xlrd中 sheet ncols sheet nrows 将给出列数和行数 openpyxl中有这样的方法吗 给定一个变量sheet 可以通过以下方式之
  • psutil:测量特定进程的CPU使用率

    我正在尝试测量进程树的 cpu 使用率 目前获取进程 没有子进程 的 cpu usage 就可以了 但我得到了奇怪的结果 import psutil p psutil Process PID p cpu percent 还给我float g
  • 从 C 线程调用 Python 代码

    我对从 C 或 C 线程调用 Python 代码时如何确保线程安全感到非常困惑 The Python 文档 http docs python org c api init html non python created threads似乎是
  • Jinja2中获取请求参数

    如何检索请求参数a在 Jinja2 模板中 http foo bar a 1 我这个答案有点晚了 但其他解决方案并没有真正考虑到您对 Flask 的使用 事实上 您将 Flask 与 Jinja2 一起使用 这使得您的情况与其他框架有点不同
  • 如何动态创建 Luigi 任务

    我正在为 Luigi Tasks 构建一个包装器 但遇到了一个障碍Register http luigi readthedocs io en stable modules luigi task register html Register该
  • python中匹配3个或更多相同的字符

    我正在尝试使用正则表达式在字符串中查找三个或更多相同的字符 例如 你好 不匹配 噢 会的 我尝试过做类似的事情 re compile 1 3 a zA Z re compile w 1 5 但似乎都不起作用 w 1 2 是您正在寻找的正则表

随机推荐