安装conda
wget https://repo.anaconda.com/archive/Anaconda3-最新版本号-Linux-x86_64.sh
运行完安装脚本后
将以下内容写入~/.bashrc,
eval "$(~/miniconda3/bin/conda shell.zsh hook)"
export PATH=$PATH:~/miniconda3/bin
source ~/.bashrc
conda --version
pip 永久换源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
wsl 开启代理
加快下载,使用windows上代理。还是在~/.bashrc中添加
host_ip=$(cat /etc/resolv.conf |grep "nameserver" |cut -f 2 -d " ")
export http_proxy="http://$host_ip:[端口]"
export https_proxy="http://$host_ip:[端口]"
注意代理软件allow LAN。WSL2 基于 Hyper-V 运行,导致 Linux 子系统和 Windows 在网络上是两台各自独立的机器,从 Linux 子系统访问 Windows 首先需要找到 Windows 的 IP。通过 cat /etc/resolv.conf
查看 DNS 服务器 IP