the step Im working on copying pyenv installation.
1 2 3 |
1. zip -r /tmp/my.pyenv.zip ~/.pyenv/ 2. scp /tmp/my.pyenv.zip new:/tmp/ 3. new# unzip /tmp/my.pyenv.zip -d ~/ |
seems it’s simple, after setting env. it failed.
1 2 3 4 |
export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" |
the problem is :
1 2 |
# pyenv init - pyenv: no such command `init' |
well after checking, it was the problem that ~/.pyenv/libexec was not in the $PATH.
comparing the src and dest env.:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# ls -altr ~/.pyenv/bin/ total 12 -rwxr-xr-x. 1 root root 731 Dec 28 09:16 python-local-exec lrwxrwxrwx. 1 root root 16 Dec 28 11:04 pyenv -> ../libexec/pyenv drwxr-xr-x. 12 root root 4096 Mar 29 08:54 .. drwxr-xr-x. 2 root root 4096 Mar 29 09:45 . # ls -altr ~/.pyenv/bin/ total 12 -rwxr-xr-x 1 root root 731 Dec 28 09:16 python-local-exec drwxr-xr-x 12 root root 4096 Mar 29 09:02 .. lrwxrwxrwx 1 root root 2695 Dec 28 09:16 pyenv drwxr-xr-x 2 root root 4096 Mar 29 09:44 . |
the problem is that pyenv is now a binary, not sym.link instead.
FIX:
1. using zip -y or –symlinks option on backup.
2. or after unzip, remove pyenv binary under ~/.pyenv/bin/, install sym-link.