无法升级Conda并使用Conda

时间:2018-05-16 04:16:19

标签: python json windows-10 anaconda conda

在我的windows10环境中,我无法使用以下命令升级conda

  
    

conda update conda

  

我的anaconda和python版本

(base) C:\Users\naseer>conda --version
conda 4.5.3

(base) C:\Users\naseer>python --version
Python 3.6.4 :: Anaconda, Inc.

以下是我的错误日志

(base)C:\ Users \ naseer> conda update conda 解决环境:失败

'>>>>>>>>>>>>>>>>>>>>>错误报告>>>>> >>>>>>>>>>>>>>

$ C:\Users\naseer\Anaconda3\Scripts\conda update conda

环境变量:                  CCHZPATH = C:\ CTEX \ CTEX \ CCT \字体                  CCPKPATH = C:\ CTEX \ CTEX \字体\ PK \无模式\ CCT \ $ DPI d                  CIO_TEST =         CONDA_DEFAULT_ENV =碱                 CONDA_EXE = C:\用户\纳瑟尔\ Anaconda3 \脚本\ conda.exe              CONDA_PREFIX = C:\用户\纳瑟尔\ Anaconda3     CONDA_PROMPT_MODIFIER =(碱)          CONDA_PYTHON_EXE = C:\用户\纳瑟尔\ Anaconda3 \ python.exe                CONDA_ROOT = C:\用户\纳瑟尔\ Anaconda3               CONDA_SHLVL = 1              GTK_BASEPATH = C:\ Program Files(x86)\ GtkSharp \ 2.12 \                  HOMEPATH = \ Users \用户纳瑟尔              INTELOCLPATH = C:\英特尔\的OpenCL \ SDK \ BIN \ 64; C:\英特尔\的OpenCL \ SDK \ BIN \ X86       MIC_LD_LIBRARY_PATH = C:\ Program Files(x86)\ Common Files \ Intel \ Shared                           图书馆\编译\ LIB \ intel64_win_mic                      PATH = C:\用户\纳瑟尔\ Anaconda3; C:\用户\纳瑟尔\ Anaconda3 \库\的mingw-W64 \                           仓; C:\用户\纳瑟尔\ Anaconda3 \库的\ usr \ BIN; C:\用户\纳瑟尔\蟒蛇                           3 \库\ BIN; C:\用户\纳瑟尔\ Anaconda3 \脚本; C:\用户\纳瑟尔\ ANACON                           da3 \ bin; C:\ Program Files(x86)\ IntelSWTools \ compilers_and_libraries_20                           18.0.124 \ windows \ mpi \ intel64 \ bin; C:\ Program Files(x86)\ Common                           Files \ Intel \ Shared Libraries \ redist \ intel64_win \ mpirt; C:\ Program Files                           (x86)\ Common Files \ Intel \ Shared                           Libraries \ redist \ ia32_win \ mpirt; C:\ Program Files(x86)\ Common                           Files \ Intel \ Shared Libraries \ redist \ intel64_win \ compiler; C:\ Program                           文件(x86)\ Common Files \ Intel \ Shared Libraries \ redist \ ia32_win \ compil                           ER; C:\英特尔\ OpenCL的\ SDK \ BIN \ 64; C:\英特尔\ OpenCL的\ SDK \ BIN \ 86; C:\英特尔\欧普                           ENCL \ SDK \ BIN \针; C:\英特尔\ OpenCL的\ SDK \ BIN \ GTPin; C:\ PROGRAM                           Files \ Microsoft MPI \ Bin \; C:\ WINDOWS \ system32; C:\ WINDOWS; C:\ WINDOWS \ Sys                           tem32 \ WBEM; C:\ Windows \ System32下\ WindowsPowerShell \ V1.0 \; C:\程序                           Files \ dotnet \; C:\ Program Files \ Microsoft SQL                           Server \ 130 \ Tools \ Binn \; C:\ Program Files(x86)\ GtkSharp \ 2.12 \ bin; C:\ CTE                           X \的UserData \是MiKTEX \ BIN; C:\ CTEX \ MIKTEX \是MiKTEX \ BIN; C:\ CTEX \ CTEX \ CTEX \ BIN;                           C:\ CTEX \ CTEX \ CCT \ BIN; C:\ CTEX \ CTEX \ TY \ BIN; C:\ CTEX \ Ghostscript的\ gs9.05 \双                           N; C:\ CTEX \ GSView程序\ GSView程序; C:\ CTEX \ WinEdt; C:\程序                           FILES \ MATLAB \ R2018a \运行\ Win64平台; C:\ PROGRAM                           FILES \ MATLAB \ R2018a \ BIN; C:\ PROGRAM                           FILES \ MATLAB \ R2016b \运行\ Win64平台; C:\ PROGRAM                           FILES \ MATLAB \ R2016b \ BIN; C:\ PROGRAM                           Files \ MATLAB \ R2016b \ polyspace \ bin; C:\ Program Files \ Git \ cmd; C:\ Program                           Files \ Microsoft VS.                           代码\ BIN; C:\用户\纳瑟尔\应用程序数据\本地\微软\ WindowsApps;              PSMODULEPATH = C:\窗口\ system32 \ WindowsPowerShell \ V1.0 \模块\; C:\程序                           Files \ WindowsPowerShell \ Modules \; C:\ Program Files(x86)\ Microsoft                           软件开发工具包\天青\ PowerShell的\ ResourceManager的\ AzureResourceManager \; C:\ PROGRAM                           文件(x86)\ Microsoft                           SDKs \ Azure \ PowerShell \ ServiceManagement \; C:\ Program Files                           (x86)\ Microsoft SDKs \ Azure \ PowerShell \ Storage \          PYTHONIOENCODING = 1252        REQUESTS_CA_BUNDLE =             SSL_CERT_FILE =

 active environment : base
active env location : C:\Users\naseer\Anaconda3
        shell level : 1
   user config file : C:\Users\naseer\.condarc

填充的配置文件:C:\ Users \ naseer.condarc           conda版本:4.5.3     conda-build版本:3.4.1          python版本:3.6.4.final.0        基础环境:C:\ Users \ naseer \ Anaconda3(可写)            频道网址:https://conda.anaconda.org/noarch/win-64                           https://conda.anaconda.org/noarch/noarch                           https://github.com/manuel-calzolari/sklearn-genetic.git/win-64                           https://github.com/manuel-calzolari/sklearn-genetic.git/noarch                           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           包缓存:C:\ Users \ naseer \ Anaconda3 \ pkgs                           C:\ Users \用户纳瑟尔\应用程序数据\本地\畅达\畅达\ PKGS        envs目录:C:\ Users \ naseer \ Anaconda3 \ envs                           C:\ Users \用户纳瑟尔\应用程序数据\本地\畅达\畅达\ ENVS                           C:\ Users \用户naseer.conda \ ENVS                平台:win-64              user-agent:conda / 4.5.3 requests / 2.18.4 CPython / 3.6.4 Windows / 10 Windows / 10.0.15063           管理员:错误              netrc文件:无            离线模式:错误

V V V V V V V V V V V V V V V V V V V V V V V V V V V V CondaHTTPError:网址https://github.com/manuel-calzolari/sklearn-genetic.git/noarch/repodata.json找不到HTTP 404 经过时间:00:01.876498 远程服务器找不到的noarch目录 请求带有网址的频道:https://github.com/manuel-calzolari/sklearn-genetic.git

从conda 4.3开始,有效频道必须包含noarch/repodata.json和 关联的noarch/repodata.json.bz2文件,即使noarch/repodata.json是 空。请请求渠道管理员创建 noarch/repodata.json和关联的noarch/repodata.json.bz2文件。 $ mkdir noarch $ echo' {}' > noarch / repodata.json $ bzip2 -k noarch / repodata.json

您需要调整您的conda配置才能继续。 使用conda config --show channels查看配置的当前状态。 可以在https://conda.io/docs/config.html找到进一步的配置帮助。

发生了可报告的应用程序错误。康达编写了上述报告。 上传成功。

(基础)C:\ Users \ naseer>

我的conda频道列表

(base) C:\Users\naseer>type C:\Users\naseer\.condarc
channels:
  - https://github.com/manuel-calzolari/sklearn-genetic.git
  - defaults
report_errors: true
ssl_verify: true

到目前为止我的努力

因此阅读错误消息它显示根据新的conda版本我需要在通道中创建一些特定文件所以我使用以下命令添加这些文件(因为我无法安装任何软件包所以我无法安装bzip2还)

我首先创建了必要的目录和文件

(base) C:\Users\naseer>mkdir noarch

(base) C:\Users\naseer>echo '{}' > noarch/repodata.json

(base) C:\Users\naseer>echo  > noarch/repodata.json.bz2

(base) C:\Users\naseer>

然后我添加了这个新频道noarch

(base) C:\Users\naseer>conda config --add channels noarch

我的condarc文件输出

(base) C:\Users\naseer>type C:\Users\naseer\.condarc
channels:
  - noarch
  - https://github.com/manuel-calzolari/sklearn-genetic.git
  - defaults
report_errors: true
ssl_verify: true

我再次尝试更新conda但仍然遇到同样的长错误?

1 个答案:

答案 0 :(得分:1)

在Windows 10中解决此问题的一个简单方法是找到文件.condarc并删除除默认频道之外的所有频道。

enter image description here

现在一切都运行得很好,比如升级conda和安装其他库,比如tensorflow。