在Linux系统中,使用conda安装包的时候出现问题,一直报Solving environment:failed,既环境失败的错误!

已有方法试验:

  • 搜索一圈之后出现最多的答案是如图,结果conda update也报错,解决不了

参考:https://blog.csdn.net/weixin_44448148/article/details/88112783

  • 多方寻找,终于找到一篇报错一样,通过挂V-P-.n解决,但是由于没有,放弃

参考:https://blog.csdn.net/qq_36414085/article/details/90048360

解决方案:

  • 由于能查到的就几种方法,不是无法试就是没法解决,之后看到可以通过修改/.condarc解决问题(如下图),于是按照文章中写的方法去修改,还是无法解决!!!

参考:https://blog.csdn.net/zplai/article/details/105548165

  • 然后突然发现昨晚因为安装完anaconda之后,由于命令行中输入anaconda-navigator打不开可视化界面,当时报错是在已有的通道中无法找到navigator,并提示在通道https://anaconda.org/中,于是在通道中加了这个地址。

  • 但是没想到这个通道会造成什么问题,因为此通道位于国内源通道上方,猜测是此原因导致环境配置失败,想着后续也不会用到这个通道,于是直接删除此通道,问题解决,pandas安装成功!!!!!

报错内容参考

ldd@ubuntu:~$ conda install pandas=0.17.1
Solving environment: failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 819, in __call__
        return func(*args, **kwargs)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/cli/main.py", line 78, in _main
        exit_code = do_call(args, p)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 77, in do_call
        exit_code = getattr(module, func_name)(args, parser)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/cli/main_create.py", line 11, in execute
        install(args, parser, 'create')
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/cli/install.py", line 235, in install
        force_reinstall=context.force,
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 518, in solve_for_transaction
        force_remove, force_reinstall)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 451, in solve_for_diff
        final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 180, in solve_final_state
        index, r = self._prepare(prepared_specs)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 592, in _prepare
        self.subdirs, prepared_specs)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/core/index.py", line 215, in get_reduced_index
        new_records = query_all(spec)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/core/index.py", line 184, in query_all
        return tuple(concat(future.result() for future in as_completed(futures)))
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 95, in query
        self.load()
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 149, in load
        _internal_state = self._load()
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 227, in _load
        mod_etag_headers.get('_mod'))
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 437, in fetch_repodata_remote_request
        timeout=timeout)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
        return self.request('GET', url, **kwargs)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
        resp = self.send(prep, **send_kwargs)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
        r = adapter.send(request, **kwargs)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/requests/adapters.py", line 412, in send
        conn = self.get_connection(request.url, proxies)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/requests/adapters.py", line 309, in get_connection
        proxy_manager = self.proxy_manager_for(proxy)
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/requests/adapters.py", line 189, in proxy_manager_for
        **proxy_kwargs
      File "/home/ldd/anaconda3/lib/python3.7/site-packages/urllib3/contrib/socks.py", line 173, in __init__
        "Unable to determine SOCKS version from %s" % proxy_url
    ValueError: Unable to determine SOCKS version from socks://127.0.0.1:1080/

`$ /home/ldd/anaconda3/bin/conda install pandas=0.17.1

  environment variables:
                ALL_PROXY=<set>
                 CIO_TEST=<not set>
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=/home/ldd/anaconda3/bin/conda
             CONDA_PREFIX=/home/ldd/anaconda3
    CONDA_PROMPT_MODIFIER=
         CONDA_PYTHON_EXE=/home/ldd/anaconda3/bin/python
               CONDA_ROOT=/home/ldd/anaconda3
              CONDA_SHLVL=1
            DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
          LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64
           MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
                 NO_PROXY=<set>
                     PATH=/home/ldd/anaconda3/bin:/home/ldd/bin:/home/ldd/.local/bin:/usr/loc
                          al/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/l
                          ocal/games:/snap/bin:/usr/local/cuda-9.0/bin
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>
            XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
         XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
                all_proxy=<set>
                 no_proxy=<set>
              socks_proxy=<set>

     active environment : base
    active env location : /home/ldd/anaconda3
            shell level : 1
       ldd config file : /home/ldd/.condarc
 populated config files : 
          conda version : 4.5.12
    conda-build version : 3.17.6
         python version : 3.7.1.final.0
       base environment : /home/ldd/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/linux-64
                          https://repo.anaconda.com/pkgs/pro/noarch
							
          package cache : /home/ldd/anaconda3/pkgs
                          /home/ldd/.conda/pkgs
       envs directories : /home/ldd/anaconda3/envs
                          /home/ldd/.conda/envs
               platform : linux-64
             ldd-agent : conda/4.5.12 requests/2.21.0 CPython/3.7.1 Linux/4.15.0-48-generic ubuntu/16.04 glibc/2.23
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?
[y/N]: 
No report sent. To permanently opt-out, use

    $ conda config --set report_errors false

 

 

Logo

更多推荐