接Python&aconda系列:conda踩坑记录1.An unexpected error has occurred. Conda has prepared the above report
想更新deeptools的版本②
(atac) vip9t07@tpm9-desktop:~$ conda update deeptools=3.5.0
CondaError: Invalid spec for 'conda update': deeptools=3.5.0
Use 'conda install' instead.
(atac) vip9t07@tpm9-desktop:~$ conda install deeptools=3.5.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages. failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- deeptools=3.5.0 -> python[version='>=3']
Your python: python=2
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
看上去像是要更新python
目前这个环境里是python2.7
要求python3
我先看看conda要不要更新
(atac) vip9t07@tpm9-desktop:~$ conda update conda
PackageNotInstalledError: Package is not installed in prefix.
prefix: /home/data/vip9t07/miniconda3/envs/atac
package name: conda
出现了,新的报错
按照方法python - 二. PackageNotInstalledError: Package is not installed in prefix
(atac) vip9t07@tpm9-desktop:~$ conda list --name base conda
# packages in environment at /home/data/vip9t07/miniconda3:
#
# Name Version Build Channel
conda 4.10.1 py36h5fab9bb_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda-package-handling 1.7.3 py36h8f6f2f9_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
(atac) vip9t07@tpm9-desktop:~$ conda update -n base conda
Collecting package metadata (current_repodata.json): done
Solving environment: \
Warning: >10 possible package resolutions (only showing differing packages):
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::libffi-3.2.1-1, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pycparser-2.18-py36_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pysocks-1.6.6-py36_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::yaml-0.1.6-0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pycparser-2.18-py36_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pysocks-1.6.6-py36_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::yaml-0.1.6-0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::libffi-3.2.1-1
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::libffi-3.2.1-1, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pycparser-2.18-py36_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::yaml-0.1.6-0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::pysocks-1.6.6-py36_0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pycparser-2.18-py36_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::yaml-0.1.6-0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::libffi-3.2.1-1, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::pysocks-1.6.6-py36_0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::libffi-3.2.1-1, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pycparser-2.18-py36_0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::pysocks-1.6.6-py36_0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::yaml-0.1.6-0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pycparser-2.18-py36_0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::libffi-3.2.1-1, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::pysocks-1.6.6-py36_0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::yaml-0.1.6-0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::libffi-3.2.1-1, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pycparser-2.18-py36_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pysocks-1.6.6-py36_0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::yaml-0.1.6-0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pycparser-2.18-py36_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pysocks-1.6.6-py36_0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::libffi-3.2.1-1, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::yaml-0.1.6-0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::libffi-3.2.1-1, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pysocks-1.6.6-py36_0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::pycparser-2.18-py36_0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::yaml-0.1.6-0
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::libffi-3.2.1-1, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::pysocks-1.6.6-py36_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64::yaml-0.1.6-0, https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64::pycparser-2.18-py36_0
... and othedone
# All requested packages already installed.
但还是有问题
找到一个方法
python - 三. python - 解决 conda 中的包分辨率
conda update --strict-channel-priority --all
不起作用
继续试
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- python=3.8
Current channels:
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/noarch
- https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/linux-64
- https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page
.
啊这
貌似是这些镜像源用不了?
去搜索发现由于版权所以国内清华、中科大等镜像都停止更新了
所以根本装不了python3.8以上
conda update conda >> successful
conda update anaconda >> gives me error saying package is not installed in prefix.
I have single installation of Python distribution on my system. How do I solve this issue?
(base) C:\Users\asukumari>conda info
active environment : base
active env location : C:\Users\asukumari\AppData\Local\Continuum\anaconda3
shell level : 1
user config file : C:\Users\asukumari\.condarc populated config files : C:\Users\asukumari\.condarc
conda version : 4.5.9
conda-build version : 3.4.1
python version : 3.6.4.final.0
base environment : C:\Users\asukumari\AppData\Local\Continuum\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/pro/win-64
https://repo.anaconda.com/pkgs/pro/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\asukumari\AppData\Local\Continuum\anaconda3\pkgs
C:\Users\asukumari\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\asukumari\AppData\Local\Continuum\anaconda3\envs
C:\Users\asukumari\AppData\Local\conda\conda\envs
C:\Users\asukumari\.conda\envs
platform : win-64
user-agent : conda/4.5.9 requests/2.18.4 CPython/3.6.4 Windows/10 Windows/10.0.16299
administrator : False
netrc file : None
offline mode : False
-----------------------------------------------------------------------------------------------------
jalazbe:conda update --prefix C:\Users\asukumari\AppData\Local\Continuum\anaconda3
Rene Duchamp: I installed both Anaconda2 and 3 and now I see conda_console option only under Anaconda2. Why? Is it just one console for both Anaconda2 and 3
Rene Duchamp:@jalazbe That dint solve it either. I am unable to figure out what to do.
Charlie Parker:did you try conda update -n base -c defaults conda?
Charlie Parker:this is my full error: PackageNotInstalledError: Package is not installed in prefix. prefix: /dfs/scratch0/brando9/miniconda/envs/metalearning_gpu package name: conda your answer doesn't help. Do I change base to the name I give above?
-----------------------------------------------------------------------------------------------------
Usually this error, “PackageNotInstalledError: Package is not installed in prefix.” is because your custom environment doesn’t have the conda infrastructure. Instead, it is in your base only. To update the base environment:
conda update --name base conda
To see what version you have installed:
conda list --name base conda
example output of list;
# packages in environment at /Users/me/miniconda2:
#
# Name Version Build Channel
conda 4.6.14 py27_0
conda-env 2.6.0 h36134e3_0
-----------------------------------------------------------
最佳答案:
user1953366:After this I get: PackageNotInstalledError: Package is not installed in prefix.
–
Vishnudev Krishnadas:If you have an activated conda environment, deactivate it conda deactivate and then conda update conda
Charlie Parker:doesn't seem to work. How do I re-install all of conda?
DanielBell99:conda deactivate then conda update conda
Dan Boschen:This still doesn't solve the problem of getting this error message after typing conda update anaconda. I've added an answer that resolves this for me.
-----------------------------------------------------------------------------------------------------
to solve the problem after message “PackageNotInstalledError: Package is not installed in prefix” package name: anaconda:
conda update --all
...
Proceed ([y]/n)? y
regards !
-----------------------------------------------------------
AnneTheAgile:That will update every package in your current env. That seems unlikely to be the goal.
emeralddove:Thank you. It worked. I had created and env and I got this error resolved with the command conda update --all. Cheers
Charlie Parker:doesn't seem to work. How do I re-install all of conda?
Charlie Parker:this is my full error: PackageNotInstalledError: Package is not installed in prefix. prefix: /dfs/scratch0/brando9/miniconda/envs/metalearning_gpu package name: conda your answer doesn't help. Do I change base to the name I give above?
-----------------------------------------------------------------------------------------------------
I got this error when I tried to update while my conda environment was activated. The solution was to first deactivate:
conda deactivate
before trying to update:
conda update conda
conda update anaconda
-----------------------------------------------------------
Dan Boschen:I still received this error after changing the environment back to base since anaconda was not in my default channels. Please see my answer for the solution to that if you still get this error message like I did.
-----------------------------------------------------------------------------------------------------
Was having the same problem, nothing worked but:
conda install anaconda
fixed it.
-----------------------------------------------------------
A. Rokbi:that's works for me...
-----------------------------------------------------------------------------------------------------
I was getting the following error when trying to update boto3 in my conda environment:
PackageNotInstalledError: Package is not installed in prefix. prefix: /usr/local/anaconda3/envs/myfoldername
package name: boto3
This was after having already just done:
conda install anaconda
conda update -n root conda
conda update --all
However, I did finally succeed in updating boto3, by specifying the version number as follows:
conda install boto3=1.12
-----------------------------------------------------------
Trond.H.H:had the same problem after "pip install emcee" - solved by "conda install emcee=3.0.2" ..
-----------------------------------------------------------------------------------------------------
When a package is installed via pip in a conda env, and updated via conda, it results in the same error message shown. In this case, use
在这里插入代码片
pip install package_name --upgrade
This solved my problem.
-----------------------------------------------------------------------------------------------------
I met the same problem in my window1 10. pls change the env to base, because the package “conda” only can be updated in base. regards!
-----------------------------------------------------------
autonopy:yup, this is the real solution to the problem. I just did this and it worked, without any extra finagling.
Dan Boschen:I still received this error after changing the environment back to base since anaconda was not in my default channels. Please see my answer for the solution to that if you still get this error message like I did.
-----------------------------------------------------------------------------------------------------
This worked for me:
conda update -n base -c defaults conda
-----------------------------------------------------------------------------------------------------
I received this error since anaconda was not available in my default channels. I fixed this by forcing the channel to be anaconda as follows:
conda install -c anaconda anaconda
-----------------------------------------------------------------------------------------------------
I don’t know why but this removed the issue when I put it in my .bashrc
file:
export PATH="$HOME/miniconda/bin:$PATH"
source ~/miniconda/bin/activate
conda activate metalearning_gpu
obvious miniconda was int he right place, change that to ur right path to conda stuff.
-----------------------------------------------------------------------------------------------------
It seems like you are trying to update base packages from inside the sub environment.
#deactivate the sub env
conda deactivate
#update base if needed
conda update conda
conda update anaconda
conda update --all
#update environment from base
conda update -n yourEnvHere [-c ARepository] --all
#reactivate the env
conda activate yourEnvHere
-----------------------------------------------------------------------------------------------------
This works for me:
source active <your python env>
-----------------------------------------------------------------------------------------------------
我一次又一次地面对这个令人不安的问题 warning: possible package resolutions (only showing different packages):
例如:
junk ❯ conda update --all
Solving environment: -
Warning: >10 possible package resolutions (only showing differing packages):
- anaconda::cymem-1.31.2-py36_0, anaconda::plac-0.9.6-py36_0, anaconda::preshed-1.0.0-py36_0, conda-forge::joblib-0.11-py36_0
- anaconda::cymem-1.31.2-py36_0, anaconda::plac-0.9.6-py36_0, anaconda::preshed-1.0.0-py36_0, defaults::joblib-0.11-py36_0
- anaconda::cymem-1.31.2-py36_0, anaconda::preshed-1.0.0-py36_0, conda-forge::joblib-0.11-py36_0, defaults::plac-0.9.6-py36_0
- anaconda::cymem-1.31.2-py36_0, anaconda::preshed-1.0.0-py36_0, defaults::joblib-0.11-py36_0, defaults::plac-0.9.6-py36_0
- anaconda::preshed-1.0.0-py36_0, conda-forge::joblib-0.11-py36_0, defaults::cymem-1.31.2-py36_0, defaults::plac-0.9.6-py36_0
- anaconda::preshed-1.0.0-py36_0, defaults::cymem-1.31.2-py36_0, defaults::joblib-0.11-py36_0, defaults::plac-0.9.6-py36_0
- anaconda::plac-0.9.6-py36_0, anaconda::preshed-1.0.0-py36_0, conda-forge::joblib-0.11-py36_0, defaults::cymem-1.31.2-py36_0
- anaconda::plac-0.9.6-py36_0, anaconda::preshed-1.0.0-py36_0, defaults::cymem-1.31.2-py36_0, defaults::joblib-0.11-py36_0
- anaconda::plac-0.9.6-py36_0, conda-forge::joblib-0.11-py36_0, defaults::cymem-1.31.2-py36_0, defaults::preshed-1.0.0-py36_0
- anaconda::cymem-1.31.2-py36_0, anaconda::plac-0.9.6-py36_0, conda-forge::joblib-0.11-py36_0, defaults::preshed-1.0.0-py36_0
... and othedone
如何解决这些警告?有没有可能压制它?彻底解决肯定比压抑好。
我已经尝试过:
$ conda update conda
但是,不幸的是,这并没有解决问题:conda/issues/1580
最佳答案
您可以使用以下命令,这个解决了我的问题
conda update --strict-channel-priority --all
基本上,这个命令强制更新所有警告包。
关于python - 解决 conda 中的包分辨率,我们在Stack Overflow上找到一个类似的问题: 四. resolving package resolutions in conda
Time and again, I’m faced with this disturbing problem of warning: possible package resolutions (only showing differing packages):
For instance:
junk ❯ conda update --all
Solving environment: -
Warning: >10 possible package resolutions (only showing differing packages):
- anaconda::cymem-1.31.2-py36_0, anaconda::plac-0.9.6-py36_0, anaconda::preshed-1.0.0-py36_0, conda-forge::joblib-0.11-py36_0
- anaconda::cymem-1.31.2-py36_0, anaconda::plac-0.9.6-py36_0, anaconda::preshed-1.0.0-py36_0, defaults::joblib-0.11-py36_0
- anaconda::cymem-1.31.2-py36_0, anaconda::preshed-1.0.0-py36_0, conda-forge::joblib-0.11-py36_0, defaults::plac-0.9.6-py36_0
- anaconda::cymem-1.31.2-py36_0, anaconda::preshed-1.0.0-py36_0, defaults::joblib-0.11-py36_0, defaults::plac-0.9.6-py36_0
- anaconda::preshed-1.0.0-py36_0, conda-forge::joblib-0.11-py36_0, defaults::cymem-1.31.2-py36_0, defaults::plac-0.9.6-py36_0
- anaconda::preshed-1.0.0-py36_0, defaults::cymem-1.31.2-py36_0, defaults::joblib-0.11-py36_0, defaults::plac-0.9.6-py36_0
- anaconda::plac-0.9.6-py36_0, anaconda::preshed-1.0.0-py36_0, conda-forge::joblib-0.11-py36_0, defaults::cymem-1.31.2-py36_0
- anaconda::plac-0.9.6-py36_0, anaconda::preshed-1.0.0-py36_0, defaults::cymem-1.31.2-py36_0, defaults::joblib-0.11-py36_0
- anaconda::plac-0.9.6-py36_0, conda-forge::joblib-0.11-py36_0, defaults::cymem-1.31.2-py36_0, defaults::preshed-1.0.0-py36_0
- anaconda::cymem-1.31.2-py36_0, anaconda::plac-0.9.6-py36_0, conda-forge::joblib-0.11-py36_0, defaults::preshed-1.0.0-py36_0
... and othedone
How do I resolve these warnings? Is it possible to suppress it? Completely resolving it would definitely be nicer than suppressing it.
I have already tried doing:
$ conda update conda
But, unfortunately, that didn’t solve the issue as claimed in: conda/issues/1580
-----------------------------------------------------------
darthbith:If you have the anaconda meta-package installed, it is not recommended to do conda update --all, since exactly this problem results. I would suggest updating packages individually if at all possible.
toliveira:Does this answer your question? How to fix package resolution warnings in conda
-----------------------------------------------------------------------------------------------------
答案:
You can use this following command this one resolved my issue
conda update --strict-channel-priority --all
Basically, this command force update all warning packages.
-----------------------------------------------------------------------------------------------------
stackoverflow
PackageNotInstalledError: Package is not installed in prefix
resolving package resolutions in conda
小狼小狼_e211
conda踩坑记录2.UnsatisfiableError: The following specifications were found to be incompatible with th…
IT工具网 (coder.work)
python - 解决 conda 中的包分辨率