Anaconda 使用conda指令出现ValueError: Unable to determine SOCKS version from socks://127.0.0.1:1080/ 解决办法

问题出现原因

在使用SOCKS代理后,添加全局代理导致conda、pip指令无法使用的问题
“Unable to determine SOCKS version from %s” % proxy_url
ValueError: Unable to determine SOCKS version from socks://127.0.0.1:1080/

environment variables:
ALL_PROXY=
CIO_TEST=
CONDA_DEFAULT_ENV=base
CONDA_EXE=/home/wzy/anaconda3/bin/conda
CONDA_PREFIX=/home/wzy/anaconda3
CONDA_PROMPT_MODIFIER=
CONDA_PYTHON_EXE=/home/wzy/anaconda3/bin/python
CONDA_ROOT=/home/wzy/anaconda3
CONDA_SHLVL=1
NO_PROXY=
PATH=/home/wzy/anaconda3/bin:/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
all_proxy=
no_proxy=

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

populated config files : /home/wzy/.condarc
conda version : 4.5.11
conda-build version : 3.15.1
python version : 3.7.0.final.0
base environment : /home/wzy/anaconda3 (writable)
channel URLs : http://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64
http://mirrors.ustc.edu.cn/anaconda/pkgs/free/noarch
package cache : /home/wzy/anaconda3/pkgs
/home/wzy/.conda/pkgs
envs directories : /home/wzy/anaconda3/envs
/home/wzy/.conda/envs
platform : linux-64
user-agent : conda/4.5.11 requests/2.19.1 CPython/3.7.0 Linux/4.15.0-62-generic ubuntu/18.04 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False

An unexpected error has occurred. Conda has prepared the above report.
Upload did not complete.

在网上翻遍了攻略 包括修改.condarc 修改bashrc等都没有解决问题

解决方案

用指令: unset all_proxy && unset ALL_PROXY
重置即可!亲测有效

你可能感兴趣的:(anaconda3)