主持人: Ubuntu 14.04
当我执行一个脚本时,遇到了以下问题:
The following packages have unmet dependencies:
dh-python : Depends: python3:any (>= 3.3.2-2~)
lsb-release : Depends: python3 but it is not going to be installed
Depends: python3:any (>= 3.3.2-2~)
ubuntu-minimal : Depends: python3 but it is not going to be installed
Depends: resolvconf
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).我输入了apt-get -f install并再次执行了脚本。但是,它没有作出任何改变。
我的系统上的python版本是:
Python 2.7.6 (default, Jun 22 2015, 17:58:13)发布于 2015-11-04 06:15:17
Python 3是这里的关键。您正在使用Python 2。
因此,我强烈建议您使用Anaconda。它将允许您在Python2和Python3之间切换。
在浏览器中下载用于Linux的Anaconda安装程序,然后在终端窗口中键入以下内容,将文件路径和名称替换为下载的安装文件的路径和名称。(也有一个gui安装程序来设置路径条目)
按照安装程序屏幕上的提示操作,如果不确定任何设置,只需接受默认设置,因为它们稍后都可以更改:
bash ~/Downloads/Anaconda-2.3.0-Linux-x86_64.sh现在将conda添加到您的路径
PATH=$PATH:$HOME/anaconda/bin*用正确的路径替换anaconda/bin的路径,无论它在机器上的哪个位置
现在创建一个使用python3的环境
conda create --name test python=3激活你的环境
source activate test您将在命令提示符前看到一个环境(test)。可以重命名测试以满足您的需要。
核实:
python --versionhttps://stackoverflow.com/questions/33514810
复制相似问题