- pip
#pip 源
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
pip install -i https://pypi.douban.com/simple django==1.11.4
# 强制安装
pip3 install jupyterlab -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade --force-reinstall
- npm
# npm 替换cnpm ,--global不能省略,安装到全局
npm install -g cnpm --registry=https://registry.npm.taobao.org #安装淘宝的cnpm
然后就可以使用cnpm命令了
#删除代理配置
npm config rm proxy
npm config rm https-proxy
# 不安装cnpm使用淘宝镜像
# 1.每次手动加
npm install art-template --registry=https://registry.npm.taobao.org //每次都要手动加
# 1.不用每次手动加--registry
npm config set registry https://registry.npm.taobao.org // npm config list 查看
# 包说明文件
# 1 描述文件的建立
npm init
# 2 安装包的时候后加上 --save ,可以保存包的版本信息
npm install --save art-template
# 3 通过包说明文件安装依赖
npm install //会自动查找目录下package.json中的dependencies的依赖
- conda
#1 配置源
# 重置源配置
conda config --remove-key channels
# 重新添加源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --set show_channel_urls yes
# 查看效果
cat ~/.condarc
#2 修改源
出现错误吧https修改成http
#3 出现无法用conda 安装
修改.yml注解点不能用的,用pip安装
dependencies:
#- markupsafe=1.1.0=py36h470a237_0
- pip:
- markupsafe==1.1.0
#4 覆盖安装,删除环境
conda env create -f environment.yml
conda env remove # 删除环境
--force # 覆盖环境
- 源码安装
git clone https://github.com/pyecharts/pyecharts.git
cd pyecharts
#pip install -r requirements.txt
python setup.py install
- brew
brew install jenkins-lts
#加速brew安装
#设置brew源
https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
#手工下载
brew --cache 查看下载的缓存目录
默认的缓存目录为
/Users/***/Library/Caches/Homebrew/Cask/xxxx
先用其它下载工具把文件下载好,并按照规则改好名字,覆盖此目录下的同名文件,最后命令行终端重新启动安装即可。