Skip to content

Instantly share code, notes, and snippets.

@gsw945
Created March 14, 2019 07:51
Show Gist options
  • Save gsw945/de69d5a0402b311304ab12bf77697bb1 to your computer and use it in GitHub Desktop.
Save gsw945/de69d5a0402b311304ab12bf77697bb1 to your computer and use it in GitHub Desktop.
pip install package via douban mirror
@echo off
chcp 65001
set args=%*
set pipi=pip install -i https://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com
if [%~1]==[] goto :show_help
if [%args%]==[-h] (
call %pipi% --help
goto do_exit
)
if [%args%]==[--help] (
call %pipi% --help
goto do_exit
)
:do_install
call %pipi% %args%
goto do_exit
:show_help
echo 错误: 请提供参数
echo 用法: pip-install.cmd 包名
echo 示例: pip-install.cmd django
echo 帮助: pip-install.cmd -h
:do_exit
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment