在conda更新后尝试在基本环境中激活spyder时丢失了模块

时间:2019-08-19 20:02:46

标签: python anaconda conda

这是在Ubuntu 18.04 Bionic中anaconda的基本环境中发生我的错误的方式:

我在anaconda基本环境中安装了python 3.6和tensorflow 1.12。然后我将tensorflow更新为1.14,并调用conda update --all来更新python包。 Conda将python版本更新为3.7和其他软件包。之后,尝试运行spyder时出现此错误

Traceback (most recent call last):
File "/home/Anaconda3/bin/spyder", line 7, in <module>
from spyder.app.start import main
File "/home/Anaconda3/lib/python3.7/site-packages/spyder/app/start.py", line 35, in <module>
from spyder.config.main import CONF
File "/home/Anaconda3/lib/python3.7/site-packages/spyder/config/main.py", line 21, in <module>
from spyder.config.fonts import BIG, MEDIUM, MONOSPACE, SANS_SERIF
File "/home/Anaconda3/lib/python3.7/site-packages/spyder/config/fonts.py", line 14, in <module>
from spyder.config.utils import is_ubuntu
File "/home/Anaconda3/lib/python3.7/site-packages/spyder/config/utils.py", line 15, in <module>
from spyder_kernels.utils import iofuncs
ModuleNotFoundError: No module named 'spyder_kernels'

然后我再次致电conda update --all,并显示不一致错误(跳过了几行)

The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
  - defaults/linux-64::python-dateutil==2.8.0=py36_0
  - defaults/linux-64::bkcharts==0.2=py37_0
  - defaults/linux-64::keyring==18.0.0=py36_0
  - defaults/linux-64::wurlitzer==1.0.2=py36_0
  - defaults/linux-64::mistune==0.8.4=py36h7b6447c_0
  - defaults/linux-64::tornado==6.0.1=py36h7b6447c_0
  - defaults/linux-64::parso==0.3.4=py36_0
  - defaults/linux-64::pycodestyle==2.5.0=py36_0
  - defaults/linux-64::mako==1.0.7=py36_0
  - defaults/linux-64::jupyter==1.0.0=py36_7
  - defaults/linux-64::pytest-astropy==0.5.0=py36_0
  - defaults/linux-64::olefile==0.46=py36_0
  - defaults/linux-64::numexpr==2.6.8=py37hd89afb7_0
  - defaults/linux-64::notebook==5.7.6=py36_0
  - defaults/linux-64::mkl_random==1.0.2=py36hd81dba3_0
  - defaults/linux-64::pyparsing==2.3.1=py36_0
  - defaults/linux-64::spyder-kernels==0.4.2=py36_0
  - defaults/linux-64::patsy==0.5.1=py37_0
  - defaults/linux-64::cloudpickle==0.8.0=py36_0
  - defaults/linux-64::tensorflow-base==1.12.0=mkl_py36h3c3e929_0
  - defaults/linux-64::boto==2.49.0=py36_0
  - defaults/linux-64::partd==0.3.9=py36_0
  - defaults/linux-64::zope==1.0=py36_1
  - defaults/linux-64::pytest-remotedata==0.3.1=py36_0
  - defaults/linux-64::llvmlite==0.27.0=py36hd408876_0
  - defaults/linux-64::constantly==15.1.0=py36h28b3542_0
  - defaults/noarch::nbconvert==5.4.1=py_2
  - defaults/linux-64::blaze==0.11.3=py37_0
  - defaults/linux-64::pandas==0.24.2=py36he6710b0_0
  - defaults/linux-64::bleach==3.1.0=py36_0
  - defaults/linux-64::sympy==1.3=py36_0
  - defaults/linux-64::gmpy2==2.0.8=py36h10f8cd9_2
  - defaults/linux-64::docutils==0.14=py36_0
  - defaults/linux-64::jupyter_core==4.4.0=py36_0
  ...
done

conda信息

    active environment : base
   active env location : /home/Anaconda3
           shell level : 1
      user config file : /home/william/.condarc
populated config files : /home/william/.condarc
         conda version : 4.7.11
   conda-build version : 3.18.9
        python version : 3.7.4.final.0
      virtual packages : 
      base environment : /home/Anaconda3  (writable)
          channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                         https://repo.anaconda.com/pkgs/main/noarch
                         https://repo.anaconda.com/pkgs/r/linux-64
                         https://repo.anaconda.com/pkgs/r/noarch
         package cache : /home/Anaconda3/pkgs
                         /home/william/.conda/pkgs
      envs directories : /home/Anaconda3/envs
                         /home/william/.conda/envs
              platform : linux-64
            user-agent : conda/4.7.11 requests/2.22.0 CPython/3.7.4 Linux/4.15.0-58-generic ubuntu/18.04.3 glibc/2.27
               UID:GID : 1000:1000
            netrc file : None
          offline mode : False

现在看来我在基本env中安装了python 3.6和3.7,这能防止出现错误吗?有什么方法可以解决此问题,而不必重新安装anaconda?非常感谢。

0 个答案:

没有答案