Indico upgrade python failed 3.9.15


Super weird problem with indico setup upgrade-python. I got 3 instance of indico (all same 3.2) 3 instance work fine. But on one I’m unable to upgrade-python. I got

(indico) indico@indico:~$ indico setup upgrade-python
updating pyenv
Traceback (most recent call last):
  File "/opt/indico/.venv/bin/indico", line 8, in <module>
  File "/opt/indico/.venv/lib/python3.9/site-packages/click/", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/indico/.venv/lib/python3.9/site-packages/click/", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/indico/.venv/lib/python3.9/site-packages/click/", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/indico/.venv/lib/python3.9/site-packages/indico/cli/", line 108, in invoke
    return self._impl.invoke(ctx)
  File "/opt/indico/.venv/lib/python3.9/site-packages/click/", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/indico/.venv/lib/python3.9/site-packages/click/", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/indico/.venv/lib/python3.9/site-packages/click/", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/indico/.venv/lib/python3.9/site-packages/indico/cli/", line 243, in upgrade_python
    proc =['pyenv', 'update'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
  File "/opt/indico/.pyenv/versions/3.9.13/lib/python3.9/", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/opt/indico/.pyenv/versions/3.9.13/lib/python3.9/", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/indico/.pyenv/versions/3.9.13/lib/python3.9/", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pyenv'
(indico) indico@indico:~$ 

On the two others the upgrade work fine (end up with 3.9.15). Before the upgrade all 3 run 3.9.10
I’m unable to see the difference between those 3 instances.


Sounds like this is missing in the ~/.bashrc:

export PATH="/opt/indico/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"

Thanks…but in fact it’s weird than that. I got those 3 lines in my bashrc, but some weird config when I do a

su - indico

«he» didn’t source the .bashrc, so I must do a

su - indico

and everything work.

I’m going to investigate…

Thanks !!!

Ok find out…missing .profile file.