Ang*_*zar 102 shell cmd anaconda conda
我试图从anaconda更新或安装新软件包,最近,此消息出现了:
The environment is inconsistent, please check the package plan carefully
The following package are causing the inconsistency:
- defaults/win-32::anaconda==5.3.1=py37_0
done
Run Code Online (Sandbox Code Playgroud)
我尝试过conda clean --all,然后conda update --all仍然存在。
康达资讯
active environment : base
active env location : C:\Users\NAME\Continuum
shell level : 1
user config file : C:\Users\NAME\.condarc
populated config files : C:\Users\NAME\.condarc
conda version : 4.6.11
conda-build version : 3.17.7
python version : 3.7.3.final.0
base environment : C:\Users\NAME\Continuum (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-32
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-32
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-32
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-32
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\NAME\Continuum\pkgs
C:\Users\NAME\.conda\pkgs
C:\Users\NAME\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\NAME\Continuum\envs
C:\Users\NAME\.conda\envs
C:\Users\NAME\AppData\Local\conda\conda\envs
platform : win-32
user-agent : conda/4.6.11 requests/2.21.0 CPython/3.7.3 Windows/10 Windows/10.0.17763
administrator : False
netrc file : None
offline mode : False
Run Code Online (Sandbox Code Playgroud)
mm4*_*307 60
我曾经遇到过同样的问题。只需运行
conda install anaconda
Run Code Online (Sandbox Code Playgroud)
为我解决了问题。
小智 49
在Google网上论坛上看到了
此消息是在conda 4.6.9中添加的,以前,除非conda在调试模式下运行,否则没有任何迹象表明conda检测到不一致的环境。一段时间以来,您的环境可能不一致,但是升级到conda使其可见。最好的选择是对不一致的软件包运行“ conda install package_name”,以使conda尝试恢复一致性。
它确实对我有用。
也许您应该conda install anaconda根据自己的情况尝试。
Jac*_*lly 25
environment is inconsistent当我尝试更新 conda 环境时出现错误base。我正在使用迷你康达。不幸的是,上面的答案都不适合我。
对我有用的是:
conda activate base
conda install conda --force-reinstall
conda install conda --force-reinstall
conda update --all
Run Code Online (Sandbox Code Playgroud)
(是的,由于某种原因有必要运行conda install conda --force-reinstall两次!)
jsc*_*abs 17
有同样的问题,其他解决方案都不适合我。最终不得不卸载并重新安装 conda,然后重新安装我的所有库。
Sac*_*mar 15
不一致是由于软件包的版本不同以及它们相互冲突的依赖性引起的。
conda update --all
Run Code Online (Sandbox Code Playgroud)
此命令将更新所有软件包,然后conda自行解决不一致问题。
han*_*ans 13
终极解决方案:
conda activate base
conda install anaconda
conda update --all
Run Code Online (Sandbox Code Playgroud)
适用于 Windows 10 和 Ubuntu 18.04(对于 ubuntu 归功于 @MF.OX)。
为我删除了以下问题:
The environment is inconsistentWARNING conda.base.context:use_only_tar_bz2(632)如果其他解决方案不起作用,恢复环境可以解决这个问题。
使用conda list --revisions,选择一个修订号,然后使用conda install --revision [#] 逐步返回,直到一切恢复正常。
Given a situation like the following,
> conda update -c intel --all
Collecting package metadata: done
Solving environment: |
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
- intel/win-64::ipython==6.3.1=py36_3
- intel/win-64::prompt_toolkit==1.0.15=py36_2
done
Run Code Online (Sandbox Code Playgroud)
As mentioned in other answers, the idea is to have some sort of re-installation to occur for the inconsistent packages.
Thus, with a few copy-&-paste's, you could:
> conda install intel/win-64::ipython==6.3.1=py36_3
Collecting package metadata: done
Solving environment: /
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
- intel/win-64::ipython==6.3.1=py36_3
- intel/win-64::prompt_toolkit==1.0.15=py36_2
done
## Package Plan ##
environment location: c:\conda
added / updated specs:
- ipython
The following NEW packages will be INSTALLED:
jedi intel/win-64::jedi-0.12.0-py36_2
parso intel/win-64::parso-0.2.0-py36_2
pygments intel/win-64::pygments-2.2.0-py36_5
wcwidth intel/win-64::wcwidth-0.1.7-py36_6
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Run Code Online (Sandbox Code Playgroud)
(and you would have to repeat for all the packages)
Alternatively, cook up an (ugly) one-liner (this should work for Windows as well as other platforms)
Note: by "ORIGINAL_COMMAND", I'm referring to any command that gives you the error message (without any other side-effects, ideally)
<ORIGINAL_COMMAND> 2>&1 | python -c "import sys,re,conda.cli; conda.cli.main('conda','install','-y',*re.findall(r'^\s*-\s*(\S+)$',sys.stdin.read(),re.MULTILINE))"
Run Code Online (Sandbox Code Playgroud)
Expanding the above one-liner:
> conda update -c intel --all
Collecting package metadata: done
Solving environment: |
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
- intel/win-64::ipython==6.3.1=py36_3
- intel/win-64::prompt_toolkit==1.0.15=py36_2
done
Run Code Online (Sandbox Code Playgroud)
该命令conda install -c anaconda anaconda对我有用。对于我的设置,我需要指定频道,否则它将无法工作。在终端中运行命令后,提示我更新发现不一致的软件包列表。如果没有这一步,我不能与安装或更新任何软件包conda install <package_name>或conda update <package_name分别。
对我有用的是
`conda remove <offending_packagename>`,
`conda update --all`
Run Code Online (Sandbox Code Playgroud)
然后最后
`conda install <offending_packagename>`.
Run Code Online (Sandbox Code Playgroud)
小智 6
对于我们这些拥有 miniconda 并且不能/不想安装 anaconda 的人来说:接受的答案在调整后有效。
conda install condaconda update --all本来会发表评论,但我的代表太低了。
我有这个问题很长时间了。可能conda install anaconda可行,但需要的时间太长了——在我的机器上超过 24 小时。
这是一个在 5 分钟内为我工作的解决方案:
conda install anaconda.但如何?有很多!
这就是我所做的:
conda create -n fresh python
conda activate fresh
conda list
保存输出,您将需要它。1b. 回到基础环境:
conda deactivate
conda命令,该命令将删除所有不一致的包:(好的包是)
exclusion_text = '''
_libgcc_mutex 0.1 main
_openmp_mutex 4.5 1_gnu
anyio 2.2.0 py39h06a4308_1
argon2-cffi 20.1.0 py39h27cfd23_1
async_generator 1.10 pyhd3eb1b0_0
...
Run Code Online (Sandbox Code Playgroud)
... 和更多!从一个好的环境中得到这个。
请注意在 python 中使用三引号 (''') 来使用多行字符串。
bad_packages_text = '''
- https://repo.continuum.io/pkgs/main/linux-64/networkx-2.1-py36_0.tar.bz2/linux-64::networkx==2.1=py36_0
- https://repo.continuum.io/pkgs/main/linux-64/spyder-3.2.6-> py36_0.tar.bz2/linux-64::spyder==3.2.6=py36_0
py36h4c697fb_0.tar.bz2/linux-64::jdcal==1.3=py36h4c697fb_0
- defaults/noarch::jupyterlab_server==1.1.4=py_0
- defaults/linux-64::argh==0.26.2=py37_0
...
Run Code Online (Sandbox Code Playgroud)
... 和更多!通过复制粘贴“以下软件包导致不一致”来获取此信息。信息。
然后,在 python 中处理这个:
exclusions = [line.split(' ')[0] for line in exclusion_text_lines if line !='']
bad_packages_lines = bad_packages_text.split('\n')
bad_packages = [line.split('::')[1].split('==')[0] for line in bad_packages_lines if line!='']
exclusions.append('conda') # make sure!
exclusions.append('tqdm')
Run Code Online (Sandbox Code Playgroud)
最后构建救生命令:
command_line = 'conda remove '
for bad_package in bad_packages:
if bad_package not in exclusions:
command_line = f'{command_line} {bad_package}'
command_line
Run Code Online (Sandbox Code Playgroud)
由于在解决环境时,列表中的所有包都remove可以被忽略,conda不再需要考虑它们的版本,并且过程很快。
也许有人可以重构此方法以使其更容易 - 或者更好的是,升级conda以启用快速reset base命令。
这对我有用——我写这篇文章比执行这些操作花费了更长的时间。
祝你好运!