wangyanhui-joel
一行命令升级所有pip安装的Python包



pip freeze --local | grep -v \'^\-e\' | cut -d = -f 1  | xargs pip install -U

建议在执行前先执行:
pip install -U distribute


由于使用了mysql-connector-python的包,在安装时要使用 --allow-external mysql-connector-python 参数,所以在升级时,也应该加上该参数,命令行为:

pip install -U distribute && pip freeze --local | grep -v \'^\-e\' | cut -d = -f 1  | xargs pip install -U --allow-external mysql-connector-python

 

分类:

技术点:

相关文章: