我希望java.lang.OutOfMemoryError
使用pip install
,使用Ansible。
语法是什么?
答案 0 :(得分:20)
- name: install the package, force upgrade
pip:
name: <your package name>
state: latest
或者用:
- name: install the package, force reinstall to the latest version
pip:
name: <your package name>
state: forcereinstall
答案 1 :(得分:8)
最终在这里找到答案: https://groups.google.com/forum/#!topic/ansible-project/a19JEpdXzck
这是语法:
- name: install the package, force upgrade
pip:
name: <your package name>
extra_args: --upgrade
答案 2 :(得分:1)
如果您需要其他Python版本的升级点,则可以使用 executable 参数:
- name: install the package, force upgrade
pip:
name: pip
executable: pip3
state: latest