未安装Conda PackageNotInstalledError:软件包未安装在前缀

时间:2019-06-17 21:53:28

标签: python anaconda jupyter

我是Anaconda的新用户,我的Anaconda导航器每次都无法启动。我在网上尝试了其他答案,例如设置PATH和Anaconda Prompt上的“ conda update --all”。即使完成所有操作,也会发生以下错误:

(base) C:\Users\utkar>conda update conda

PackageNotInstalledError: Package is not installed in prefix.
  prefix: C:\Anaconda3
  package name: conda

由conda创建的错误报告附后:

'''

>>>>>>>>>>>>>>>>>>>>>>错误报告<<<<<<<<<<<<<<<<<<<<<<< / h1>
Traceback (most recent call last):
  File "C:\Anaconda3\lib\site-packages\conda\exceptions.py", line 1003, in __call__
    return func(*args, **kwargs)
  File "C:\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
    exit_code = do_call(args, p)
  File "C:\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
    exit_code = getattr(module, func_name)(args, parser)
  File "C:\Anaconda3\lib\site-packages\conda\cli\main_install.py", line 20, in execute
    install(args, parser, 'install')
  File "C:\Anaconda3\lib\site-packages\conda\cli\install.py", line 257, in install
    force_reinstall=context.force_reinstall or context.force,
  File "C:\Anaconda3\lib\site-packages\conda\core\solve.py", line 107, in solve_for_transaction
    force_remove, force_reinstall)
  File "C:\Anaconda3\lib\site-packages\conda\core\solve.py", line 145, in solve_for_diff
    force_remove)
  File "C:\Anaconda3\lib\site-packages\conda\core\solve.py", line 241, in solve_final_state
    ssc = self._add_specs(ssc)
  File "C:\Anaconda3\lib\site-packages\conda\core\solve.py", line 441, in _add_specs
    conda_prefix_rec = ssc.prefix_data.get('conda')
  File "C:\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 109, in get
    return self._prefix_records[package_name]
KeyError: 'conda'

$ C:\Anaconda3\Scripts\conda-script.py install conda`

  environment variables:
                 CIO_TEST=<not set>
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=C:\Anaconda3\condabin\..\Scripts\conda.exe
               CONDA_EXES="C:\Anaconda3\condabin\..\Scripts\conda.exe"
             CONDA_PREFIX=C:\Anaconda3
    CONDA_PROMPT_MODIFIER=(base)
               CONDA_ROOT=C:\Anaconda3
              CONDA_SHLVL=1
                 HOMEPATH=\Users\utkar
                     PATH=C:\Anaconda3;C:\Anaconda3\Library\mingw-w64\bin;C:\Anaconda3\Library\u
                      sr\bin;C:\Anaconda3\Library\bin;C:\Anaconda3\Scripts;C:\Anaconda3\bin;
                          C:\Anaconda3;C:\Anaconda3\Library\mingw-w64\bin;C:\Anaconda3\Library\u
                      sr\bin;C:\Anaconda3\Library\bin;C:\Anaconda3\Scripts;C:\Anaconda3\bin;

C:\Anaconda3\condabin;C:\ProgramData\Oracle\Java\javapath;C:\Program
                      Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Wi
                      ndows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
                      \WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R)
                      Management Engine Components\DAL;C:\Program Files\Intel\Intel(R)
                      Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R)
                      Management Engine Components\IPT;C:\Program Files\Intel\Intel(R)
                      Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corpora
                      tion\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\W
                      bem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program
                      Files\Git\cmd;C:\php;C:\Program
                      Files\nodejs;C:\Apache24\bin;C:\Program Files\MySQL\MySQL Utilities 1.
                      6;C:\WINDOWS\System32\OpenSSH;C:\Anaconda3;C:\Anaconda3\Scripits;\Anac
                      onda3\Scripts;C:\Anaconda3
         PSMODULEPATH=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files\W
                      indowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Mo
                      dules
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : base
    active env location : C:\Anaconda3
            shell level : 1
       user config file : C:\Users\utkar\.condarc
 populated config files : C:\Users\utkar\.condarc
          conda version : 4.6.14
    conda-build version : 3.17.8
         python version : 3.7.3.final.0
       base environment : C:\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/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Anaconda3\pkgs
                          C:\Users\utkar\.conda\pkgs
                          C:\Users\utkar\AppData\Local\conda\conda\pkgs
       envs directories : C:\Anaconda3\envs
                          C:\Users\utkar\.conda\envs
                          C:\Users\utkar\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.6.14 requests/2.22.0 CPython/3.7.3 Windows/10 Windows/10.0.17134
          administrator : False
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.

'''

请帮助解决此错误。

1 个答案:

答案 0 :(得分:0)

我想知道这是否不是this bug的体现。

如果是这样,以下内容应会有所帮助:

conda update -n base conda (if you have conda >=4.4)

或对于较旧版本的conda:

conda update -n root conda