Ubuntu apt-get, pip, conda 청화 이미지 소스 추가

1329 단어 ubuntu
apt-get
apt(advanced package tool): Ubuntu 패키지 관리
apt는 etc/apt/sources에 있습니다.list에 공식 라이브러리 주소 (미국) 가 기록되어 있지만, 속도는 보장할 수 없습니다. 청화경 원본을 추가할 수 있습니다
1. 백업 소스list
cp sources.list  sources.list .bak

2. 소스 수정.list
소스를 비웁니다.list
echo ' '>sources.list

소스 편집.list
vim sources.list
error : Found a swap file by the name ".sources.list.swp"

    :rm .sources.list.swp

청화 소프트웨어 원본 렌즈에서 대응하는 시스템의 렌즈를 찾아 소스로 복사합니다.list(i: 편집, ESC: 편집 종료,: wq: 종료 저장)
3. 업데이트
업데이트 소스: sudo apt-get 업데이트
업데이트 소프트웨어:sudo apt-get upgrade
pip
임시 사용:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

기본값으로 설정:
수정~/.config/pip/pip.conf(없으면 생성)
mkdir ~/.pip
vim .pip/pip.conf

수정index-url-tuna(예:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn

pip와 pip3이 병존할 때 수정~/.pip/pip.conf만 하면 됩니다.
conda
conda 소스를 수정하려면 다음 명령을 사용합니다.
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes

좋은 웹페이지 즐겨찾기