gpt4 book ai didi

python - 全新重新安装 Anaconda 失败 - 删除 Anaconda 与系统之间的所有冲突

转载 作者:行者123 更新时间:2023-12-01 08:06:41 24 4
gpt4 key购买 nike

在更新过程中破坏了我的 Anaconda 环境(问题描述 here)后,我决定尝试重新安装 Anaconda。然而,尽管经过数小时的研究和错误查找,我还是未能安装 Anaconda。

我的问题是如何让我的系统恢复到 Anaconda 不会与我的系统发生冲突的状态。

在下面查找详细信息。

我的步骤如下:

  • 我卸载了 Anaconda。
  • 我下载了最新版本的 Anaconda 并安装了它。不幸的是,没有安装 Anaconda 提示符的可执行文件,Anaconda 也没有出现在开始菜单中。该问题已部分解决 here
  • 我卸载了 Anaconda 并安装了 Miniconda。
  • Miniconda 安装成功。我按照建议安装了 anaconda-clean here并运行它。
  • 我卸载了 Miniconda,并确保 PATH 中没有出现 python 安装。
  • 我删除了涉及 Python 的注册表项
  • 我从 PATH 中删除了所有包含属于 Qt5 的文件的目录
  • 我检查了 AppData 中没有出现 Python 和 Anaconda
  • 我尝试再次安装 Anaconda,但出现与上述相同的失败。
  • 我卸载了 Anaconda 并安装了 Miniconda。
  • 我安装了 anaconda-navigator
  • 我尝试安装 Glueviz,但失败了
  • 我删除了由此产生的不一致,并逐个安装了软件包
  • 我在安装 ipykernel 时遇到了问题,完整输出如下。
(base) C:\Users\Me>conda install ipykernel -v
Collecting package metadata: ...working... done
Solving environment: ...working... done
initializing UnlinkLinkTransaction with
target_prefix: D:\_Programme\Anaconda3
unlink_precs:

link_precs:
defaults::libsodium-1.0.16-h9d3ae62_0
defaults::zeromq-4.3.1-h33f27b4_3
defaults::pyzmq-18.0.0-py37ha925a31_0
defaults::jupyter_client-5.2.4-py37_0
defaults::ipykernel-5.1.0-py37h39e3cac_0



## Package Plan ##

environment location: D:\_Programme\Anaconda3

added / updated specs:
- ipykernel


The following NEW packages will be INSTALLED:

ipykernel pkgs/main/win-64::ipykernel-5.1.0-py37h39e3cac_0
jupyter_client pkgs/main/win-64::jupyter_client-5.2.4-py37_0
libsodium pkgs/main/win-64::libsodium-1.0.16-h9d3ae62_0
pyzmq pkgs/main/win-64::pyzmq-18.0.0-py37ha925a31_0
zeromq pkgs/main/win-64::zeromq-4.3.1-h33f27b4_3


Proceed ([y]/n)? y

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... ===> LINKING PACKAGE: defaults::libsodium-1.0.16-h9d3ae62_0 <===
prefix=D:\_Programme\Anaconda3
source=D:\_Programme\Anaconda3\pkgs\libsodium-1.0.16-h9d3ae62_0


===> LINKING PACKAGE: defaults::zeromq-4.3.1-h33f27b4_3 <===
prefix=D:\_Programme\Anaconda3
source=D:\_Programme\Anaconda3\pkgs\zeromq-4.3.1-h33f27b4_3


===> LINKING PACKAGE: defaults::pyzmq-18.0.0-py37ha925a31_0 <===
prefix=D:\_Programme\Anaconda3
source=D:\_Programme\Anaconda3\pkgs\pyzmq-18.0.0-py37ha925a31_0


===> LINKING PACKAGE: defaults::jupyter_client-5.2.4-py37_0 <===
prefix=D:\_Programme\Anaconda3
source=D:\_Programme\Anaconda3\pkgs\jupyter_client-5.2.4-py37_0


===> LINKING PACKAGE: defaults::ipykernel-5.1.0-py37h39e3cac_0 <===
prefix=D:\_Programme\Anaconda3
source=D:\_Programme\Anaconda3\pkgs\ipykernel-5.1.0-py37h39e3cac_0


$ C:\WINDOWS\system32\cmd.exe /d /c D:\_Programme\Anaconda3\.tmprx2boc11.bat
==> cwd: D:\_Programme\Anaconda3\Scripts <==
==> exit code: 1 <==
==> stdout <==

==> stderr <==
Das System kann den angegebenen Pfad nicht finden.
Parameterformat falsch - 65001.



An error occurred while installing package 'defaults::ipykernel-5.1.0-py37h39e3cac_0'.
LinkError: post-link script failed for package defaults::ipykernel-5.1.0-py37h39e3cac_0
running your command again with `-v` will provide additional information
location of failed script: D:\_Programme\Anaconda3\Scripts\.ipykernel-post-link.bat
==> script messages <==
<None>

Attempting to roll back.


===> REVERSING PACKAGE LINK: defaults::ipykernel-5.1.0-py37h39e3cac_0 <===
prefix=D:\_Programme\Anaconda3


failed
An error occurred while installing package 'defaults::ipykernel-5.1.0-py37h39e3cac_0'.
LinkError: post-link script failed for package defaults::ipykernel-5.1.0-py37h39e3cac_0
running your command again with `-v` will provide additional information
location of failed script: D:\_Programme\Anaconda3\Scripts\.ipykernel-post-link.bat
==> script messages <==
<None>

Attempting to roll back.


Rolling back transaction: ...working... ===> REVERSING PACKAGE LINK: defaults::jupyter_client-5.2.4-py37_0 <===
prefix=D:\_Programme\Anaconda3


===> REVERSING PACKAGE LINK: defaults::pyzmq-18.0.0-py37ha925a31_0 <===
prefix=D:\_Programme\Anaconda3


===> REVERSING PACKAGE LINK: defaults::zeromq-4.3.1-h33f27b4_3 <===
prefix=D:\_Programme\Anaconda3


===> REVERSING PACKAGE LINK: defaults::libsodium-1.0.16-h9d3ae62_0 <===
prefix=D:\_Programme\Anaconda3


done
Traceback (most recent call last):
File "D:\_Programme\Anaconda3\lib\site-packages\conda\core\link.py", line 1079, in run_script
subprocess_call(command_args, env=env, path=dirname(path))
File "D:\_Programme\Anaconda3\lib\site-packages\conda\gateways\subprocess.py", line 85, in subprocess_call
output=formatted_output)
subprocess.CalledProcessError: Command '['C:\\WINDOWS\\system32\\cmd.exe', '/d', '/c', 'D:\\_Programme\\Anaconda3\\.tmprx2boc11.bat']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\_Programme\Anaconda3\lib\site-packages\conda\core\link.py", line 649, in _execute_post_link_actions
activate=True)
File "D:\_Programme\Anaconda3\lib\site-packages\conda\core\link.py", line 1095, in run_script
raise LinkError(message)
conda.exceptions.LinkError: post-link script failed for package defaults::ipykernel-5.1.0-py37h39e3cac_0
running your command again with `-v` will provide additional information
location of failed script: D:\_Programme\Anaconda3\Scripts\.ipykernel-post-link.bat
==> script messages <==
<None>


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\_Programme\Anaconda3\lib\site-packages\conda\core\link.py", line 558, in _execute
cls._execute_post_link_actions(pkg_idx_tracked, axngroup)
File "D:\_Programme\Anaconda3\lib\site-packages\conda\core\link.py", line 664, in _execute_post_link_actions
reverse_excs,
conda.CondaMultiError: post-link script failed for package defaults::ipykernel-5.1.0-py37h39e3cac_0
running your command again with `-v` will provide additional information
location of failed script: D:\_Programme\Anaconda3\Scripts\.ipykernel-post-link.bat
==> script messages <==
<None>



During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\_Programme\Anaconda3\lib\site-packages\conda\exceptions.py", line 1003, in __call__
return func(*args, **kwargs)
File "D:\_Programme\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "D:\_Programme\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "D:\_Programme\Anaconda3\lib\site-packages\conda\cli\main_install.py", line 20, in execute
install(args, parser, 'install')
File "D:\_Programme\Anaconda3\lib\site-packages\conda\cli\install.py", line 275, in install
handle_txn(unlink_link_transaction, prefix, args, newenv)
File "D:\_Programme\Anaconda3\lib\site-packages\conda\cli\install.py", line 304, in handle_txn
unlink_link_transaction.execute()
File "D:\_Programme\Anaconda3\lib\site-packages\conda\core\link.py", line 241, in execute
self._execute(tuple(concat(interleave(itervalues(self.prefix_action_groups)))))
File "D:\_Programme\Anaconda3\lib\site-packages\conda\core\link.py", line 587, in _execute
rollback_excs,
conda.CondaMultiError: post-link script failed for package defaults::ipykernel-5.1.0-py37h39e3cac_0
running your command again with `-v` will provide additional information
location of failed script: D:\_Programme\Anaconda3\Scripts\.ipykernel-post-link.bat
==> script messages <==
<None>

德语部分翻译成英语:

$ C:\WINDOWS\system32\cmd.exe /d /c D:\_Programme\Anaconda3\.tmprx2boc11.bat
==> cwd: D:\_Programme\Anaconda3\Scripts <==
==> exit code: 1 <==
==> stdout <==

==> stderr <==
Das System kann den angegebenen Pfad nicht finden.
Parameterformat falsch - 65001.

翻译为

$ C:\WINDOWS\system32\cmd.exe /d /c D:\_Programme\Anaconda3\.tmprx2boc11.bat
==> cwd: D:\_Programme\Anaconda3\Scripts <==
==> exit code: 1 <==
==> stdout <==

==> stderr <==
The system cannot find the specified path
Parameter format is wrong - 65001.

Here讨论这个问题的帖子很长。我为完成安装而采取的许多步骤都受到了该主题中帖子的启发,但我没有成功。请注意,我也在链接的线程中发布了我的问题。如果我得到 Anaconda 开发人员的帮助,我会确保答案也发布在这里。

我相信我的系统一定处于某种阻碍我安装 Anaconda 的状态。所有描述的问题似乎都很常见,但到目前为止,所建议的解决方案都不适合我。我已经没有想法了,对我(以及其他有同样问题的人)可以采取的一系列步骤感兴趣,以便将我的系统转移到与 Anaconda 不冲突的状态。

有关 conda 的详细信息:

(base) C:\Users\Me>conda info

active environment : base
active env location : D:\_Programme\Anaconda3
shell level : 1
user config file : C:\Users\Me\.condarc
populated config files : C:\Users\Me\.condarc
conda version : 4.6.9
conda-build version : not installed
python version : 3.7.1.final.0
base environment : D:\_Programme\Anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : D:\_Programme\Anaconda3\pkgs
C:\Users\Me\.conda\pkgs
C:\Users\Me\AppData\Local\conda\conda\pkgs
envs directories : D:\_Programme\Anaconda3\envs
C:\Users\Me\.conda\envs
C:\Users\Me\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.6.9 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.17134
administrator : False
netrc file : None
offline mode : False

我正在使用 64 位 Windows 10。

最佳答案

暂时禁用我的防病毒程序对我来说很有效。我正在使用 Windows 10 内置的防病毒程序。

打开 Windows Defender 安全中心并关闭实时保护。安装ipykernel包,再次开启实时保护。

此后,到目前为止我还没有遇到任何进一步的问题。

关于python - 全新重新安装 Anaconda 失败 - 删除 Anaconda 与系统之间的所有冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55503705/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com