python pip issue while creating image
linux-devil opened this issue · comments
I get following error while creating image
fatal: [jetson]: FAILED! => {
"changed": true,
"cmd": "python3 /tmp/get-pip.py --user",
"delta": "0:00:00.148139",
"end": "2020-08-13 04:54:39.254664",
"invocation": {
"module_args": {
"_raw_params": "python3 /tmp/get-pip.py --user",
"_uses_shell": true,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"msg": "non-zero return code",
"rc": 2,
"start": "2020-08-13 04:54:39.106525",
"stderr": "/usr/bin/python3: can't open file '/tmp/get-pip.py': [Errno 13] Permission denied",
"stderr_lines": [
"/usr/bin/python3: can't open file '/tmp/get-pip.py': [Errno 13] Permission denied"
],
"stdout": "",
"stdout_lines": []
}
Fixed this using:
-
name: Download pip
get_url:
url: https://bootstrap.pypa.io/get-pip.py
dest: /home/{user.name}/get-pip.py -
name: Install pip
shell: python3 /home/{user.name}/get-pip.py --user
become: yes