当前位置:首页 > 编程笔记 > 正文
已解决

R-install_miniconda()卸载 | conda命令行报错及解决方法

来自网友在路上 187887提问 提问时间:2023-11-09 15:14:53阅读次数: 87

最佳答案 问答题库878位专家为你答疑解惑

在这里插入图片描述

运行以下代码,突然报错:

C:\Users\hp>conda info-e

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

Traceback (most recent call last):File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\conda\exception_handler.py", line 17, in __call__return func(*args, **kwargs)^^^^^^^^^^^^^^^^^^^^^File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\conda\cli\main.py", line 61, in main_subshellcontext.__init__(argparse_args=pre_args)File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\conda\base\context.py", line 456, in __init__self._set_search_path(File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\conda\common\configuration.py", line 1428, in _set_search_pathself._set_raw_data(dict(self._load_search_path(self._search_path)))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\conda\common\configuration.py", line 1417, in _load_search_pathyield path, YamlRawParameter.make_raw_parameters_from_file(path)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\conda\common\configuration.py", line 401, in make_raw_parameters_from_fileyaml_obj = yaml_round_trip_load(fh)^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\conda\common\serialize.py", line 43, in yaml_round_trip_loadreturn _yaml_round_trip().load(string)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\ruamel\yaml\main.py", line 432, in loadconstructor, parser = self.get_constructor_parser(stream)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\ruamel\yaml\main.py", line 483, in get_constructor_parserself.reader.stream = stream^^^^^^^^^^^^^^^^^^File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\ruamel\yaml\reader.py", line 133, in streamself.determine_encoding()File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\ruamel\yaml\reader.py", line 193, in determine_encodingself.update_raw()File "C:\Users\hp\AppData\Local\r-miniconda\Lib\site-packages\ruamel\yaml\reader.py", line 288, in update_rawdata = self.stream.read(size)^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in position 612: illegal multibyte sequence
`$ C:\Users\hp\AppData\Local\r-miniconda\Scripts\conda-script.py info-e`An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.Example: conda --no-plugins install <package>Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.Example: CONDA_NO_PLUGINS=true conda install <package>If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers? [y/N]:

突然出现以上报错后,卸载miniconda:

  1. 删除miniconda安装目录下的envspkgs文件夹;
  2. 运行miniconda安装目录下的Miniconda unistall.exe应用程序,来卸载软件包。

卸载后在R中重新安装,出现以下报错:

install_miniconda() # 安装miniconda环境

  • Installing Miniconda – please wait a moment …
  • Downloading “https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe” …
    trying URL ‘https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe’
    Warning: URL ‘https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe’: status was 'Couldn’t resolve host name’Error in download.file(url, destfile = installer, mode = “wb”) :
    cannot open URL ‘https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe’

解决方法:关掉代理之后,再次运行该代码。

> install_miniconda() # 安装miniconda环境
* Installing Miniconda -- please wait a moment ...
* Downloading "https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe" ...
trying URL 'https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe'
Content type 'application/octet-stream' length 77445248 bytes (73.9 MB)
downloaded 73.9 MB+ "C:/Users/hp/AppData/Local/r-miniconda/condabin/conda.bat" update --yes --name base conda
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done## Package Plan ##environment location: C:\Users\hp\AppData\Local\R-MINI~1added / updated specs:- condaThe following packages will be downloaded:package                    |            build---------------------------|-----------------archspec-0.2.1             |     pyhd3eb1b0_0          39 KBbrotli-python-1.0.9        |  py311hd77b12b_7         310 KBconda-23.10.0              |  py311haa95532_0         1.2 MBconda-libmamba-solver-23.11.0|  py311haa95532_0         103 KBlibmamba-1.5.3             |       hcd6fe79_0         3.8 MBlibmambapy-1.5.3           |  py311h77c03ed_0         323 KBopenssl-3.0.12             |       h2bbff1b_0         7.4 MBurllib3-1.26.18            |  py311haa95532_0         252 KByaml-cpp-0.8.0             |       hd77b12b_0         2.0 MB------------------------------------------------------------Total:        15.5 MBThe following NEW packages will be INSTALLED:archspec           pkgs/main/noarch::archspec-0.2.1-pyhd3eb1b0_0 brotli-python      pkgs/main/win-64::brotli-python-1.0.9-py311hd77b12b_7 The following packages will be REMOVED:brotlipy-0.7.0-py311h2bbff1b_1002The following packages will be UPDATED:conda                              23.9.0-py311haa95532_0 --> 23.10.0-py311haa95532_0 conda-libmamba-so~                 23.9.1-py311haa95532_0 --> 23.11.0-py311haa95532_0 libmamba                                 1.5.1-hcd6fe79_0 --> 1.5.3-hcd6fe79_0 libmambapy                          1.5.1-py311h77c03ed_0 --> 1.5.3-py311h77c03ed_0 openssl                                 3.0.11-h2bbff1b_2 --> 3.0.12-h2bbff1b_0 urllib3                           1.26.16-py311haa95532_0 --> 1.26.18-py311haa95532_0 yaml-cpp                                 0.7.0-hd77b12b_1 --> 0.8.0-hd77b12b_0 Downloading and Extracting Packages: ...working... done
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
+ "C:/Users/hp/AppData/Local/r-miniconda/condabin/conda.bat" "create" "--yes" "--name" "r-reticulate" "python=3.9" "numpy" "--quiet" "-c" "conda-forge"
Channels:- conda-forge- defaults
Platform: win-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done## Package Plan ##environment location: C:\Users\hp\AppData\Local\R-MINI~1\envs\r-reticulateadded / updated specs:- numpy- python=3.9The following packages will be downloaded:package                    |            build---------------------------|-----------------bzip2-1.0.8                |       hcfcfb64_5         122 KB  conda-forgeca-certificates-2023.7.22  |       h56e8100_0         146 KB  conda-forgeintel-openmp-2023.2.0      |   h57928b3_50497         2.4 MB  conda-forgelibblas-3.9.0              |     19_win64_mkl         4.8 MB  conda-forgelibcblas-3.9.0             |     19_win64_mkl         4.8 MB  conda-forgelibffi-3.4.2               |       h8ffe710_5          41 KB  conda-forgelibhwloc-2.9.3             |default_haede6df_1009         2.5 MB  conda-forgelibiconv-1.17              |       h8ffe710_0         698 KB  conda-forgeliblapack-3.9.0            |     19_win64_mkl         4.8 MB  conda-forgelibsqlite-3.44.0           |       hcfcfb64_0         833 KB  conda-forgelibxml2-2.11.5             |       hc3477c8_1         1.5 MB  conda-forgelibzlib-1.2.13             |       hcfcfb64_5          54 KB  conda-forgemkl-2023.2.0               |   h6a75c08_50496       138.0 MB  conda-forgenumpy-1.26.0               |   py39hddb5d58_0         5.7 MB  conda-forgeopenssl-3.1.4              |       hcfcfb64_0         7.1 MB  conda-forgepip-23.3.1                 |     pyhd8ed1ab_0         1.3 MB  conda-forgepthreads-win32-2.9.1       |       hfa6e2cd_3         141 KB  conda-forgepython-3.9.18              |h4de0772_0_cpython        16.1 MB  conda-forgepython_abi-3.9             |           4_cp39           7 KB  conda-forgesetuptools-68.2.2          |     pyhd8ed1ab_0         454 KB  conda-forgetbb-2021.10.0              |       h91493d7_2         153 KB  conda-forgetk-8.6.13                  |       h5226925_1         3.3 MB  conda-forgetzdata-2023c               |       h71feb2d_0         115 KB  conda-forgeucrt-10.0.22621.0          |       h57928b3_0         1.2 MB  conda-forgevc-14.3                    |      h64f974e_17          17 KB  conda-forgevc14_runtime-14.36.32532   |      hdcecf7f_17         722 KB  conda-forgevs2015_runtime-14.36.32532 |      h05e6639_17          17 KB  conda-forgewheel-0.41.3               |     pyhd8ed1ab_0          57 KB  conda-forgexz-5.2.6                   |       h8d14728_0         213 KB  conda-forge------------------------------------------------------------Total:       197.1 MBThe following NEW packages will be INSTALLED:bzip2              conda-forge/win-64::bzip2-1.0.8-hcfcfb64_5 ca-certificates    conda-forge/win-64::ca-certificates-2023.7.22-h56e8100_0 intel-openmp       conda-forge/win-64::intel-openmp-2023.2.0-h57928b3_50497 libblas            conda-forge/win-64::libblas-3.9.0-19_win64_mkl libcblas           conda-forge/win-64::libcblas-3.9.0-19_win64_mkl libffi             conda-forge/win-64::libffi-3.4.2-h8ffe710_5 libhwloc           conda-forge/win-64::libhwloc-2.9.3-default_haede6df_1009 libiconv           conda-forge/win-64::libiconv-1.17-h8ffe710_0 liblapack          conda-forge/win-64::liblapack-3.9.0-19_win64_mkl libsqlite          conda-forge/win-64::libsqlite-3.44.0-hcfcfb64_0 libxml2            conda-forge/win-64::libxml2-2.11.5-hc3477c8_1 libzlib            conda-forge/win-64::libzlib-1.2.13-hcfcfb64_5 mkl                conda-forge/win-64::mkl-2023.2.0-h6a75c08_50496 numpy              conda-forge/win-64::numpy-1.26.0-py39hddb5d58_0 openssl            conda-forge/win-64::openssl-3.1.4-hcfcfb64_0 pip                conda-forge/noarch::pip-23.3.1-pyhd8ed1ab_0 pthreads-win32     conda-forge/win-64::pthreads-win32-2.9.1-hfa6e2cd_3 python             conda-forge/win-64::python-3.9.18-h4de0772_0_cpython python_abi         conda-forge/win-64::python_abi-3.9-4_cp39 setuptools         conda-forge/noarch::setuptools-68.2.2-pyhd8ed1ab_0 tbb                conda-forge/win-64::tbb-2021.10.0-h91493d7_2 tk                 conda-forge/win-64::tk-8.6.13-h5226925_1 tzdata             conda-forge/noarch::tzdata-2023c-h71feb2d_0 ucrt               conda-forge/win-64::ucrt-10.0.22621.0-h57928b3_0 vc                 conda-forge/win-64::vc-14.3-h64f974e_17 vc14_runtime       conda-forge/win-64::vc14_runtime-14.36.32532-hdcecf7f_17 vs2015_runtime     conda-forge/win-64::vs2015_runtime-14.36.32532-h05e6639_17 wheel              conda-forge/noarch::wheel-0.41.3-pyhd8ed1ab_0 xz                 conda-forge/win-64::xz-5.2.6-h8d14728_0 Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
* Miniconda has been successfully installed at "C:/Users/hp/AppData/Local/r-miniconda".
[1] "C:/Users/hp/AppData/Local/r-miniconda"
查看全文

99%的人还看了

猜你感兴趣

版权申明

本文"R-install_miniconda()卸载 | conda命令行报错及解决方法":http://eshow365.cn/6-36300-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!