weixin_44227522 2020-04-04 21:54 采纳率: 0%
浏览 810
已结题

anaconda创建环境问题

在ubuntu18.04 LTS 下载anaconda3,添加清华网站镜像源后,用conda create -n habitat python=3.6 cmake=3.14.0指令创建环境失败,报错显示无发链接至清华镜像源的服务器。网络没有问题,也没有挂VPN,而且按照其他人的方法把镜像源渠道删除后重新添加也没有效果。有没有人知道这个问题怎么解决吗?

Traceback (most recent call last):
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 251, in _load
    raise UnavailableInvalidChannel(self.url_w_repodata_fn, 404)
conda.exceptions.UnavailableInvalidChannel: The channel is not accessible or is invalid.
  channel name: anaconda/pkgs/free
  channel url: https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
  error code: 404

You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 248, in _load
    repodata_fn=self.repodata_fn)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 598, in fetch_repodata_remote_request
    raise Response304ContentUnchanged()
conda.core.subdir_data.Response304ContentUnchanged

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1079, in __call__
    return func(*args, **kwargs)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/cli/main.py", line 84, in _main
    exit_code = do_call(args, p)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
    return getattr(module, func_name)(args, parser)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/cli/main_create.py", line 37, in execute
    install(args, parser, 'create')
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/cli/install.py", line 265, in install
    should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 117, in solve_for_transaction
    should_retry_solve)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 158, in solve_for_diff
    force_remove, should_retry_solve)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 262, in solve_final_state
    ssc = self._collect_all_metadata(ssc)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/common/io.py", line 88, in decorated
    return f(*args, **kwds)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 415, in _collect_all_metadata
    index, r = self._prepare(prepared_specs)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 1011, in _prepare
    self.subdirs, prepared_specs, self._repodata_fn)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/index.py", line 228, in get_reduced_index
    repodata_fn=repodata_fn)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 105, in query_all
    result = tuple(concat(executor.map(subdir_query, channel_urls)))
  File "/home/chen/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 598, in result_iterator
    yield fs.pop().result()
  File "/home/chen/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 428, in result
    return self.__get_result()
  File "/home/chen/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/home/chen/anaconda3/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 98, in <lambda>
    package_ref_or_match_spec))
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 110, in query
    self.load()
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 174, in load
    _internal_state = self._load()
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 255, in _load
    return self._load()
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 263, in _load
    mod_etag_headers.get('_mod'))
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 311, in _read_local_repdata
    _internal_state = self._process_raw_repodata_str(raw_repodata_str)
  File "/home/chen/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 349, in _process_raw_repodata_str
    json_obj = json.loads(raw_repodata_str or '{}')
  File "/home/chen/anaconda3/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/home/chen/anaconda3/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/chen/anaconda3/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 93288 column 9 (char 2391882)

$ /home/chen/anaconda3/bin/conda create -n habitat python=3.7 cmake=3.14.0

environment variables:
CIO_TEST=
CONDA_DEFAULT_ENV=base
CONDA_EXE=/home/chen/anaconda3/bin/conda
CONDA_PREFIX=/home/chen/anaconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=/home/chen/anaconda3/bin/python
CONDA_ROOT=/home/chen/anaconda3
CONDA_SHLVL=1
PATH=/home/chen/anaconda3/bin:/home/chen/anaconda3/bin:/home/chen/anaconda3
/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
:/usr/games:/usr/local/games:/snap/bin
REQUESTS_CA_BUNDLE=
SSL_CERT_FILE=
WINDOWPATH=2

 active environment : base
active env location : /home/chen/anaconda3
        shell level : 1
   user config file : /home/chen/.condarc

populated config files : /home/chen/.condarc
conda version : 4.8.2
conda-build version : 3.18.11
python version : 3.7.6.final.0
virtual packages : __cuda=10.1
__glibc=2.27
base environment : /home/chen/anaconda3 (writable)
channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch
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/chen/anaconda3/pkgs
/home/chen/.conda/pkgs
envs directories : /home/chen/anaconda3/envs
/home/chen/.conda/envs
platform : linux-64
user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Linux/5.3.0-45-generic ubuntu/18.04.4 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False

  • 写回答

2条回答 默认 最新

  • threenewbee 2020-04-04 22:19
    关注

    raise UnavailableInvalidChannel(self.url_w_repodata_fn, 404)

    404说明这个地址已经被删除了

    检查地址有没有写错,or 换一个源

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算