タイトルの通りanyenv環境下で pyenv install
できずに少し詰まったのでメモ
環境
macOS Mojave 10.14.3
anyenv 1.0.1
pyenv 1.2.9
現象
$ pyenv
pyenv 1.2.9-16-g9baa6efe
Usage: pyenv <command> [<args>]
Some useful pyenv commands are:
commands List all available pyenv commands
local Set or show the local application-specific Python version
global Set or show the global Python version
shell Set or show the shell-specific Python version
rehash Rehash pyenv shims (run this after installing executables)
version Show the current Python version and its origin
versions List all Python versions available to pyenv
which Display the full path to an executable
whence List all Python versions that contain the given executable
$ pyenv install -l
pyenv: no such command `install'
上記の通りinstall, uninstallコマンドが使えない状態に
解決策
anyenv install pyenv
時に python-build
が実行されていなかったため、以下を実行
$ ~/.anyenv/envs/pyenv/plugins/python-build/install.sh
結果
正常に使えるようになりました。
$ pyenv
pyenv 1.2.9-16-g9baa6efe
Usage: pyenv <command> [<args>]
Some useful pyenv commands are:
commands List all available pyenv commands
local Set or show the local application-specific Python version
global Set or show the global Python version
shell Set or show the shell-specific Python version
install Install a Python version using python-build
uninstall Uninstall a specific Python version
rehash Rehash pyenv shims (run this after installing executables)
version Show the current Python version and its origin
versions List all Python versions available to pyenv
which Display the full path to an executable
whence List all Python versions that contain the given executable
$ pyenv install -l
Available versions:
2.1.3
2.2.3
2.3.7
...
他に同じような症状の方を見かけなかったので謎です。。