機器學習第一天--pytorch環境配置踩坑記錄(一)

日月既往、不复可追。發表於2024-07-28
> > 問題描述:
> > 在Anaconda Prompt (anaconda3)中使用conda create命令新建環境報錯如下:
> > base) C:\Users\yi>conda create --name py36 python=3.6
> > Collecting package metadata (current_repodata.json): failed

> > # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

> >     Traceback (most recent call last):
> >       File "E:\anaconda\lib\site-packages\conda\exceptions.py", line 1082, in __call__
> >         return func(*args, **kwargs)
> >       File "E:\anaconda\lib\site-packages\conda\cli\main.py", line 87, in _main
> >         exit_code = do_call(args, p)
> >       File "E:\anaconda\lib\site-packages\conda\cli\conda_argparse.py", line 84, in do_call
> >         return getattr(module, func_name)(args, parser)
> >       File "E:\anaconda\lib\site-packages\conda\cli\main_create.py", line 41, in execute
> >         install(args, parser, 'create')
> >       File "E:\anaconda\lib\site-packages\conda\cli\install.py", line 260, in install
> >         unlink_link_transaction = solver.solve_for_transaction(
> >       File "E:\anaconda\lib\site-packages\conda\core\solve.py", line 152, in solve_for_transaction

解決方案:
開啟.condarc檔案在(C:\Users\使用者名稱)如下:

channels:
  - https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
  - https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
  - https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
ssl_verify: true

刪除 - https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
再次新建環境,成功。

相關文章