-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyenv_global
does not set the correct version
#221
Comments
I encountered the same issue. Running |
When I use - name: Install pyenv
hosts: hm-ubuntu
roles:
- role: staticdev.pyenv
# https://github.com/pyenv/pyenv/releases
pyenv_version: v2.3.23
pyenv_env: user
pyenv_python_versions:
- 3.11.4
pyenv_global:
- 3.11.4
tasks:
- name: Set global Python version
ansible.builtin.shell:
cmd: pyenv global 3.11.4 I got error
I guess I will have to activate pyenv related environemnt. Just share my other working workaround way - name: Install pyenv
hosts: hm-ubuntu
roles:
- role: staticdev.pyenv
# https://github.com/pyenv/pyenv/releases
pyenv_version: v2.3.23
pyenv_env: user
pyenv_python_versions:
- 3.11.4
pyenv_global:
- 3.11.4
tasks:
- name: Creates directory ~/pyenv
ansible.builtin.file:
path: ~/pyenv
state: directory
- name: Set global Python version
ansible.builtin.copy:
dest: ~/pyenv/version
content: 3.11.4
mode: 0644 |
Hmm this maybe fixed by #222 once it merged. |
Done. |
I am trying to set default global Python version. Here is my code:
However, after I apply it on a Ubuntu machine,
pyenv_global
seems not being set up correctly.Here is the result when running inside this Ubuntu machine. I am hoping it select
3.11.4
by default. However, the default version is still usingsystem
.Any ideas? Thanks! 😃
The text was updated successfully, but these errors were encountered: