我不能再使用conda实用程序。我多年来一直定期使用它,但是最近,由于我安装了python模块scp
(使用命令conda install scp
,我不知道它是否重要)而没有任何明显的异常,因此我得到的错误低于我使用conda时立即执行命令(conda安装…,conda更新…,conda卸载…,…,消息始终是相同的):
Solving environment: failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/exceptions.py", line 819, in __call__
return func(*args, **kwargs)
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/cli/main.py", line 78, in _main
exit_code = do_call(args, p)
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/cli/conda_argparse.py", line 77, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/cli/main_update.py", line 14, in execute
install(args, parser, 'update')
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/cli/install.py", line 235, in install
force_reinstall=context.force,
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/core/solve.py", line 506, in solve_for_transaction
force_remove, force_reinstall)
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/core/solve.py", line 439, in solve_for_diff
final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove)
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/core/solve.py", line 180, in solve_final_state
index, r = self._prepare(prepared_specs)
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/core/solve.py", line 580, in _prepare
self.subdirs, prepared_specs)
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/core/index.py", line 215, in get_reduced_index
new_records = query_all(spec)
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/core/index.py", line 184, in query_all
return tuple(concat(future.result() for future in as_completed(futures)))
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/core/subdir_data.py", line 94, in query
self.load()
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/core/subdir_data.py", line 148, in load
_internal_state = self._load()
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/core/subdir_data.py", line 216, in _load
mod_etag_headers.get('_mod'))
File "/Users/steph/anaconda/lib/python3.5/site-packages/conda/core/subdir_data.py", line 416, in fetch_repodata_remote_request
timeout=timeout)
File "/Users/steph/anaconda/lib/python3.5/site-packages/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/Users/steph/anaconda/lib/python3.5/site-packages/requests/sessions.py", line 479, in request
prep.url, proxies, stream, verify, cert
File "/Users/steph/anaconda/lib/python3.5/site-packages/requests/sessions.py", line 654, in merge_environment_settings
env_proxies = get_environ_proxies(url) or {}
File "/Users/steph/anaconda/lib/python3.5/site-packages/requests/utils.py", line 617, in get_environ_proxies
if should_bypass_proxies(url):
TypeError: should_bypass_proxies_patched() missing 1 required positional argument: 'no_proxy'
`$ /Users/steph/anaconda/bin/conda update conda`
environment variables:
CIO_TEST=<not set>
CLASSPATH=/Users/steph/workspace
CONDA_ROOT=/Users/steph/anaconda
LD_LIBRARY_PATH=/opt/local/lib:/opt/local/lib/gcc5:/usr/lib:/usr/local/lib:/Users/step
h/anaconda/pkgs/qt-4.8.7-1/lib
PATH=/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Framewo
rks/Python.framework/Versions/3.6/bin:/opt/local/bin:/opt/local/sbin:.
:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Te
X/texbin:/Developer/usr/bin:/Users/steph/anaconda/bin
PYTHONPATH=/Users/steph/python_work:/Users/steph/python_lib
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : None
user config file : /Users/steph/.condarc
populated config files :
conda version : 4.5.6
conda-build version : 3.10.5
python version : 3.5.5.final.0
base environment : /Users/steph/anaconda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/osx-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/osx-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /Users/steph/anaconda/pkgs
/Users/steph/.conda/pkgs
envs directories : /Users/steph/anaconda/envs
/Users/steph/.conda/envs
platform : osx-64
user-agent : conda/4.5.6 requests/2.12.4 CPython/3.5.5 Darwin/15.6.0 OSX/10.11.6
UID:GID : 504:20
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?
…
我试图查看我的.condarc
文件,甚至删除了它,但它并没有改变pb。您知道我能做些什么才能恢复正常工作吗?
答案 0 :(得分:3)
好的。我在Anaconda 3 2018 ver中遇到了相同的问题。所以我所做的是我使用了Anaconda提示符。它会自动将基本conda文件链接到所需的代理。只需在提示中键入“ conda --version”即可检查提示。然后输入“ conda install numpy”。瞧!你完成了。
答案 1 :(得分:2)
降级到conda 4.5.5为我解决了这个问题。
戴上帽子:这是大约18个月来第三次conda更新导致错误,导致构建失败,并且还有很多其他问题。我猜想它会在某个时候被核心的conda人修复,也许是由第三方依赖关系的特定组合引起的,但是一种或另一种conda总是显得非常棘手。曾经有一个更新导致conda安装conda自行删除!
答案 2 :(得分:2)
谢谢你,行得通! 如果链接变旧,这是简化的副本:
将函数“ should_bypass_proxies_patched”替换为:
def should_bypass_proxies_patched(should_bypass_proxies_func, url, no_proxy=None):
if url.startswith("file://"):
return True
try:
return should_bypass_proxies_func(url, no_proxy)
except TypeError:
return should_bypass_proxies_func(url)
答案 3 :(得分:0)
这个问题仍然存在-在我安装新的Windows 10和最新稳定的Anaconda(2018.12)的新Windows 10上开始发生。在“ conda install -c conda-forge xgboost”命令上获取“解决环境:失败”。我可以从基本渠道安装一些东西,例如。 'conda install numpy'
(base) C:\Windows\system32>conda info active environment : base active env location : C:\ProgramData\Anaconda3 shell level : 1 user config file : C:\Users\maglk\.condarc populated config files : C:\Users\maglk\.condarc conda version : 4.5.12 conda-build version : 3.17.6 python version : 3.7.1.final.0 base environment : C:\ProgramData\Anaconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/win-64 https://conda.anaconda.org/conda-forge/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 package cache : C:\ProgramData\Anaconda3\pkgs C:\Users\maglk\AppData\Local\conda\conda\pkgs envs directories : C:\ProgramData\Anaconda3\envs C:\Users\maglk\AppData\Local\conda\conda\envs C:\Users\maglk\.conda\envs platform : win-64 user-agent : conda/4.5.12 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.17134 administrator : True netrc file : None offline mode : False
答案 4 :(得分:0)
删除到C:\Users\maglk\.condarc
,然后更新Conda。这将在Windows中解决。
conda update conda
答案 5 :(得分:0)
我遇到了同样的问题并解决了。
在 Anaconda提示 中,
使用pip install scp
,而不是conda install scp
答案 6 :(得分:0)
我已经尝试解决这个问题一段时间了。最后,我发现您应该使用pip install而不是conda install。 通常我们在Windows命令提示符中使用pip install,而在Anaconda Prompt中使用conda安装。但是对我来说,我通过在Anaconda提示符下使用pip install解决了这个问题。 输出如下所示
答案 7 :(得分:0)
我有同样的问题,我只是通过
解决了1。卸载anaconda并下载最新版本
2。创建一个新环境,然后尝试在该环境中安装软件包