anaconda 基础环境(版本 2022.05)克隆期间的安全和 Clobber 错误
Safety and Clobber errors during clone of anaconda base environment (Version 2022.05)
我在 windows 10(64 位)机器上安装了 anaconda 发行版(版本 2022.05)。在安装过程中,我遵循了 here 给出的建议(仅为我自己安装,没有将 anaconda 添加到 PATH 变量)。我没有更改任何设置,因此您可以假设使用默认设置的原始水蟒。
我需要安装一些不属于发行版的附加包。因此,我想使用基础环境的克隆作为起点来创建一个新环境。但是,当我尝试通过
克隆基地时
conda create --clone base --name base_clone
我收到奇怪的错误消息:
Source: C:\Users\john.smith\Anaconda3
Destination: C:\Users\john.smith\Anaconda3\envs\base_clone
The following packages cannot be cloned out of the root environment:
- defaults/win-64::conda-4.12.0-py39haa95532_0
- defaults/win-64::conda-build-3.21.8-py39haa95532_2
- defaults/win-64::conda-env-2.6.0-haa95532_1
- defaults/noarch::conda-token-0.3.0-pyhd3eb1b0_0
- defaults/win-64::anaconda-2022.05-py39_0
- defaults/win-64::anaconda-navigator-2.1.4-py39haa95532_0
- defaults/win-64::console_shortcut-0.1.1-4
- defaults/win-64::powershell_shortcut-0.0.1-3
Packages: 397
Files: 6
Preparing transaction: done
Verifying transaction: |
SafetyError: The package for _ipyw_jlab_nb_ext_conf located at C:\Users\john.smith\Anaconda3\pkgs\_ipyw_jlab_nb_ext_conf-0.1.0-py39haa95532_0
appears to be corrupted. The path 'Scripts/jupyter-labhub-script.py'
has an incorrect size.
reported size: 962 bytes
actual size: 203 bytes
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/ast_transforms.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/c_ast.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/c_lexer.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/c_parser.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/lextab.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/ply/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/ply/__pycache__/lex.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/ply/__pycache__/yacc.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/plyparser.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/yacctab.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/bdist_wheel.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/cli/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/macosx_libfile.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/metadata.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/pkginfo.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/util.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/vendored/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/vendored/packaging/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/vendored/packaging/__pycache__/_typing.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/vendored/packaging/__pycache__/tags.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/wheelfile.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/win-64::notebook-6.4.8-py39haa95532_0, defaults/win-64::notebook-6.4.8-py39haa95532_0
path: 'menu/notebook.json'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::jupyterlab-3.3.2-pyhd3eb1b0_0, defaults/win-64::_ipyw_jlab_nb_ext_conf-0.1.0-py39haa95532_0
path: 'scripts/jupyter-labhub-script.py'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::jupyterlab-3.3.2-pyhd3eb1b0_0, defaults/win-64::_ipyw_jlab_nb_ext_conf-0.1.0-py39haa95532_0
path: 'scripts/jupyter-labhub.exe'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/win-64::spyder-5.1.5-py39haa95532_1, defaults/win-64::spyder-5.1.5-py39haa95532_1
path: 'menu/spyder_shortcut.json'
done
Executing transaction: -
Windows 64-bit packages of scikit-learn can be accelerated using scikit-learn-intelex.
More details are available here: https://intel.github.io/scikit-learn-intelex
For example:
$ conda install scikit-learn-intelex
$ python -m sklearnex my_application.py
done
#
# To activate this environment, use
#
# $ conda activate base_clone
#
# To deactivate an active environment, use
#
# $ conda deactivate
消息的第一部分(“无法从根环境中克隆以下包”)在 问题中进行了解释,我猜这可能与安全和破坏错误有关?
在做了一些研究后,我发现 this 问题表明我不能克隆基础环境,因为它很特殊。这让我有点困惑,因为据我所知,anaconda 文档中的任何地方都没有说明。
编辑 1:但是,在 anaconda 导航器中,支持此概念的基本环境禁用了“克隆”按钮。
因此,为了我的目的,复制基础环境的正确方法是什么?
附带说明:
我也尝试了yml方法(我在yml的第一行更改了环境名称)
(base) PS D:-05-2022_PythonDeployment> conda env export --name base > base2305.yml
(base) PS D:-05-2022_PythonDeployment> conda env create --file .\base2305.yml
产生了同样的错误。我在 windows 10 VM 以及物理 windows 10 安装上对此进行了测试。
编辑 2:
我忘了提到克隆过程有些成功,因为执行后确实存在一个新环境“base_clone”。但是,我不愿意在克隆过程中忽略错误消息。
我找到了一个解决方案,可以在克隆过程中生成几乎相同的基本环境副本,并且没有任何错误消息:
- 将基础环境导出到yaml文件:
conda env export --name base > base.yml
- 打开yaml文件。在第一行中,将第一行
name: base
中的环境名称更改为任何其他名称。在依赖项列表中,删除以下九个包:
- anaconda=2022.05=py39_0
- anaconda-navigator=2.1.4=py39haa95532_0
- conda=4.12.0=py39haa95532_0
- conda-build=3.21.8=py39haa95532_2
- conda-env=2.6.0=haa95532_1
- conda-token=0.3.0=pyhd3eb1b0_0
- console_shortcut=0.1.1=4
- powershell_shortcut=0.0.1=3
- _ipyw_jlab_nb_ext_conf=0.1.0=py39haa95532_0
conda 提到前八个包不可克隆(请参阅相关代码部分)。最后一个包裹似乎是违规者,需要另外删除。
以新名称保存修改后的yaml文件,例如base_mod.yml
- 使用修改后的yaml文件生成与基础环境几乎一致的环境:
conda env create --file base_mod.yml
据我所知,Conda、anaconda navigator、jupyter ……在特此创建的环境中运行良好。尽管像克隆(原始)基础环境这样的基本功能需要一些尝试和错误才能使其正常工作,但这有点令人沮丧。
我在 windows 10(64 位)机器上安装了 anaconda 发行版(版本 2022.05)。在安装过程中,我遵循了 here 给出的建议(仅为我自己安装,没有将 anaconda 添加到 PATH 变量)。我没有更改任何设置,因此您可以假设使用默认设置的原始水蟒。
我需要安装一些不属于发行版的附加包。因此,我想使用基础环境的克隆作为起点来创建一个新环境。但是,当我尝试通过
克隆基地时conda create --clone base --name base_clone
我收到奇怪的错误消息:
Source: C:\Users\john.smith\Anaconda3
Destination: C:\Users\john.smith\Anaconda3\envs\base_clone
The following packages cannot be cloned out of the root environment:
- defaults/win-64::conda-4.12.0-py39haa95532_0
- defaults/win-64::conda-build-3.21.8-py39haa95532_2
- defaults/win-64::conda-env-2.6.0-haa95532_1
- defaults/noarch::conda-token-0.3.0-pyhd3eb1b0_0
- defaults/win-64::anaconda-2022.05-py39_0
- defaults/win-64::anaconda-navigator-2.1.4-py39haa95532_0
- defaults/win-64::console_shortcut-0.1.1-4
- defaults/win-64::powershell_shortcut-0.0.1-3
Packages: 397
Files: 6
Preparing transaction: done
Verifying transaction: |
SafetyError: The package for _ipyw_jlab_nb_ext_conf located at C:\Users\john.smith\Anaconda3\pkgs\_ipyw_jlab_nb_ext_conf-0.1.0-py39haa95532_0
appears to be corrupted. The path 'Scripts/jupyter-labhub-script.py'
has an incorrect size.
reported size: 962 bytes
actual size: 203 bytes
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/ast_transforms.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/c_ast.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/c_lexer.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/c_parser.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/lextab.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/ply/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/ply/__pycache__/lex.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/ply/__pycache__/yacc.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/plyparser.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/pycparser/__pycache__/yacctab.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/bdist_wheel.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/cli/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/macosx_libfile.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/metadata.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/pkginfo.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/util.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/vendored/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/vendored/packaging/__pycache__/__init__.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/vendored/packaging/__pycache__/_typing.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/vendored/packaging/__pycache__/tags.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
path: 'lib/site-packages/wheel/__pycache__/wheelfile.cpython-39.pyc'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/win-64::notebook-6.4.8-py39haa95532_0, defaults/win-64::notebook-6.4.8-py39haa95532_0
path: 'menu/notebook.json'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::jupyterlab-3.3.2-pyhd3eb1b0_0, defaults/win-64::_ipyw_jlab_nb_ext_conf-0.1.0-py39haa95532_0
path: 'scripts/jupyter-labhub-script.py'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/noarch::jupyterlab-3.3.2-pyhd3eb1b0_0, defaults/win-64::_ipyw_jlab_nb_ext_conf-0.1.0-py39haa95532_0
path: 'scripts/jupyter-labhub.exe'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/win-64::spyder-5.1.5-py39haa95532_1, defaults/win-64::spyder-5.1.5-py39haa95532_1
path: 'menu/spyder_shortcut.json'
done
Executing transaction: -
Windows 64-bit packages of scikit-learn can be accelerated using scikit-learn-intelex.
More details are available here: https://intel.github.io/scikit-learn-intelex
For example:
$ conda install scikit-learn-intelex
$ python -m sklearnex my_application.py
done
#
# To activate this environment, use
#
# $ conda activate base_clone
#
# To deactivate an active environment, use
#
# $ conda deactivate
消息的第一部分(“无法从根环境中克隆以下包”)在
因此,为了我的目的,复制基础环境的正确方法是什么?
附带说明: 我也尝试了yml方法(我在yml的第一行更改了环境名称)
(base) PS D:-05-2022_PythonDeployment> conda env export --name base > base2305.yml
(base) PS D:-05-2022_PythonDeployment> conda env create --file .\base2305.yml
产生了同样的错误。我在 windows 10 VM 以及物理 windows 10 安装上对此进行了测试。 编辑 2: 我忘了提到克隆过程有些成功,因为执行后确实存在一个新环境“base_clone”。但是,我不愿意在克隆过程中忽略错误消息。
我找到了一个解决方案,可以在克隆过程中生成几乎相同的基本环境副本,并且没有任何错误消息:
- 将基础环境导出到yaml文件:
conda env export --name base > base.yml
- 打开yaml文件。在第一行中,将第一行
name: base
中的环境名称更改为任何其他名称。在依赖项列表中,删除以下九个包:
- anaconda=2022.05=py39_0
- anaconda-navigator=2.1.4=py39haa95532_0
- conda=4.12.0=py39haa95532_0
- conda-build=3.21.8=py39haa95532_2
- conda-env=2.6.0=haa95532_1
- conda-token=0.3.0=pyhd3eb1b0_0
- console_shortcut=0.1.1=4
- powershell_shortcut=0.0.1=3
- _ipyw_jlab_nb_ext_conf=0.1.0=py39haa95532_0
conda 提到前八个包不可克隆(请参阅相关代码部分)。最后一个包裹似乎是违规者,需要另外删除。
以新名称保存修改后的yaml文件,例如base_mod.yml
- 使用修改后的yaml文件生成与基础环境几乎一致的环境:
conda env create --file base_mod.yml
据我所知,Conda、anaconda navigator、jupyter ……在特此创建的环境中运行良好。尽管像克隆(原始)基础环境这样的基本功能需要一些尝试和错误才能使其正常工作,但这有点令人沮丧。