ヴェズルフェルニルの研究ノート

座右の銘「ただ一人犀の角のように歩め」的な研究活動ノート

【ROS】libuvc_cameraによるUVCカメラ映像取得

ROSの研究に本格的に取り組み始めたが、その主目的はカメラ映像や自己位置推定の動画をモバイルデバイスへ配信する環境を作ることだ。

この目的への取っかかりとして、およびROSの動作を理解するために、最初にROS上でのUVCカメラの映像取得を試みてみた。

ググって調べてみると、UVCカメラ用のROSパッケージはlibuvc_cameraとusb_camの2つの種類があるようだ。

$ apt search ros-melodic
....    ....

ros-melodic-libuvc-camera/bionic,now 0.0.10-1bionic.20221025.192649 amd64
  USB Video Class camera driver

....    ....

ros-melodic-usb-cam/bionic 0.3.7-1bionic.20230322.235857 amd64
  A ROS Driver for V4L USB Cameras

....    ....

libuvc_cameraはカメラの映像フォーマットの変更に対応しているが、usb_camの方は対応していないらしい。ただし、上の最終更新日から判るが、よりメンテナンスが行われているのはusb_camのようだ。

取りあえず、libuvc_cameraの方を使ってROS上でのUVCカメラの映像取得をやってみた。

wiki.ros.org

libuvc_cameraパッケージのインストール

$ sudo apt install ros-melodic-libuvc-camera

UVCカメラ映像取得のROSコマンド

ros-melodic-libuvc-cameraパッケージをインストールした後、3つのターミナル画面を開いて、それぞれで以下のコマンドを順番に実行する。

  • ターミナル 1
$ roscore
  • ターミナル 2
$ rosrun libuvc_camera camera_node
  • ターミナル 3
$ rosrun image_view image_view image:=/image_raw

ただし、ターミナル 2 のコマンドを実行すると、下のようなエラーが表示される。

$ rosrun libuvc_camera camera_node
[ INFO] [1693820844.531653508]: Opening camera with vendor=0x0, product=0x0, serial="", index=0
[ERROR] [1693820844.532629997]: Permission denied opening /dev/bus/usb/001/004

このエラーは、デフォルト状態ではUVCカメラ・デバイスに対する書き込み権限がないために起きている。

UVCカメラのアクセス権限設定

上記の障害を回避するには、まず以下のコマンドによって対象カメラ・デバイスがどれなのかを調べる。

$ ls -l /dev/bus/usb/00*
/dev/bus/usb/001:
total 0
crw-rw-r-- 1 root root 189, 0  9月  6 10:36 001
crw-rw-r-- 1 root root 189, 1  9月  6 10:36 002
crw-rw-r-- 1 root root 189, 3  9月  6 10:58 004

/dev/bus/usb/002:
total 0
crw-rw-r-- 1 root root 189, 128  9月  6 10:36 001

/dev/bus/usb/003:
total 0
crw-rw-r-- 1 root root 189, 256  9月  6 10:36 001

/dev/bus/usb/004:
total 0
crw-rw-r-- 1 root root 189, 384  9月  6 10:36 001
crw-rw-r-- 1 root root 189, 385  9月  6 10:36 002
crw-rw-r-- 1 root root 189, 387  9月  6 10:58 004
$ lsusb
Bus 001 Device 004: ID 046d:081b Logitech, Inc. Webcam C310
Bus 001 Device 002: ID 203a:fffc  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 004: ID 203a:fff9  
Bus 004 Device 002: ID 203a:fff9  
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

上の2つのコマンドの出力情報から、対象カメラ・デバイスLogitech, Inc. Webcam C310であることが判る。

そこで、下のコマンドを実行して、対象カメラのデバイスファイルに対する書き込み権限を与えてやれば、この障害を回避することができる。

$ sudo chmod a+w /dev/bus/usb/001/004
$ ls -l /dev/bus/usb/001/004
crw-rw-rw- 1 root root 189, 3  9月  6 10:58 004

ただし、対象カメラを一旦切断して再度接続すると、そのデバイスファイルのアクセス権限は元に戻ってしまうので、また本障害に遭遇することになる。

恒常的にこの障害を回避するには、下のようなudevルール・ファイルを作成しておけば良い。

$ sudo vi /etc/udev/rules.d/99-uvc.rules
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="081b", MODE="0666"

上の記述内のATTRS{idVendor}==ATTRS{idProduct}==に設定する値は、lsusbコマンドによって表示される対象デバイスID 046d:081bから決める。

このファイルを作成した後、対象カメラを一旦切断して再度接続してやれば、udevルールが適用されてカメラ・デバイスへの書き込み権限が設定される。

UVCカメラ映像取得ROSコマンドの再実行

この状態で、ターミナル 2のコマンドを再度起動すると、今度は正常に実行される。

  • ターミナル 2
$ rosrun libuvc_camera camera_node
[ INFO] [1693964283.867968187]: Opening camera with vendor=0x0, product=0x0, serial="", index=0
unsupported descriptor subtype VS_COLORFORMAT
unsupported descriptor subtype VS_COLORFORMAT
attempt to claim already-claimed interface 1
[ WARN] [1693964284.586118108]: Unable to set scanning_mode to 0
[ WARN] [1693964284.597984745]: Unable to set exposure_absolute to 1
[ WARN] [1693964284.600210747]: Unable to set auto_focus to 1
[ WARN] [1693964284.602504735]: Unable to set focus_absolute to 0
[ WARN] [1693964284.607419215]: Unable to set iris_absolute to 0
[ WARN] [1693964284.610973004]: Unable to set pantilt to 0, 0
Controls callback. class: 17, event: 0, selector: 4, attr: 0, data_len: 4
Controls callback. class: 18, event: 0, selector: 4, attr: 0, data_len: 2
Controls callback. class: 18, event: 0, selector: 10, attr: 0, data_len: 2
Controls callback. class: 17, event: 0, selector: 4, attr: 0, data_len: 4
Controls callback. class: 18, event: 0, selector: 4, attr: 0, data_len: 2
Controls callback. class: 18, event: 0, selector: 10, attr: 0, data_len: 2
[ INFO] [1693964284.913010078]: using default calibration URL
[ INFO] [1693964284.913113367]: camera calibration URL: file:///home/LOGINUSER/.ros/camera_info/camera.yaml
[ INFO] [1693964284.913218996]: Unable to open camera calibration file [/home/LOGINUSER/.ros/camera_info/camera.yaml]
[ WARN] [1693964284.913246013]: Camera calibration file /home/LOGINUSER/.ros/camera_info/camera.yaml not found.
Controls callback. class: 18, event: 0, selector: 10, attr: 0, data_len: 2
Controls callback. class: 18, event: 0, selector: 4, attr: 0, data_len: 2
Controls callback. class: 18, event: 0, selector: 10, attr: 0, data_len: 2
Controls callback. class: 17, event: 0, selector: 4, attr: 0, data_len: 4
Controls callback. class: 17, event: 0, selector: 4, attr: 0, data_len: 4
....    ....
....    ....

そして、ターミナル 3のコマンドを実行すると、カメラの映像が取得表示される。

  • ターミナル 3
$ rosrun image_view image_view image:=/image_raw
[ INFO] [1693965375.488105036]: Initializing nodelet with 4 worker threads.
[ INFO] [1693965375.601250199]: Using transport "raw"

【参照サイト】

qiita.com

ROS MelodicのUbuntu 18.04へのインストール

前々からずっと興味を持っていたROSの研究に取り組み始めることにした。

その事始めとして、まずはUbuntuへのROS Melodic Moreniaのインストールを行った。

wiki.ros.org

上のROSの公式サイトにインストール手順が書かれており、これと同じ内容になってしまうが、本記事のあとROS関連の記事を続けて書く予定なので、自サイトの参照リンク先を作っておきたかった。それと、自分の備忘録も兼ねて、ROSのインストール手順を記事に書くておくことにする。

ROSの各バージョンはインストール対象のプラットホームOSが決まっており、ROS MelodicはUbuntu 18.04へしかインストールできない。

ROSバージョン Ubuntuのバージョン サポート期限
Melodic Morenia 18.04 2023年5月
Noetic Ninjemys 20.04 2025年5月

最初の使用対象としてなぜ古めでサポート期限切れのMelodicをわざわざ選択したかというと、MelodicからNoeticへ変わる際に、ROSの開発ツールの動作対象がPython 2から3へ変更されたらしい。この変更内容を経験しておきたかった。それと、これは自分のポリシーなのだが、新しいフレームワークやライブラリを利用するときはいつも最新版の2つくらい前のバージョンから使い始めるようにしている。これによって、それらの発展変化や背景技術への理解が深まるからだ。

現在の私の主力使用はUbuntu 20.04と22.04なので、少しMelodicを使ったあとで、NoeticとROS 2 Foxy Fitzroy以降へ移行するつもりでいる。

ROS Melodicのインストール

aptへのROSリポドトリの登録

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

ROSリポドトリ公開鍵の取得

$ sudo apt install curl
$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

ROS環境一式のインストール

$ sudo apt update
$ sudo apt install ros-melodic-desktop-full

利用可能ROSパッケージ一覧の表示

$ apt search ros-melodic

ROS環境の設定

$ echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
$ echo "source /opt/ros/melodic/setup.zsh" >> ~/.zshrc
$ source ~/.zshrc

パッケージ・ビルド環境の構築

ツールのインストール

$ sudo apt install build-essential
$ sudo apt install python-rosdep python-rosinstall python-rosinstall-generator

ツール環境の初期化

$ sudo rosdep init
$ rosdep update

ワークスペース環境の構築

ツールのインストール

$ sudo apt install python-catkin-tools 

ワークスペースの作成

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws
$ catkin init
$ catkin build

新しいワークスペースは任意の場所に任意の名前で作成して良い。

作成済みワークスペースをROS環境へ反映する

$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.zshrc
$ source ~/.zshrc

ちなみに、私がROSを研究する目的は360度映像や自己位置推定などの動画配信環境を作りたいだけだ。UnityでROSを利用できると知ったことが、ROSに本気で取り組もうと思ったきっかけで、Unityを利用してモバイル対象動画配信を実現することがROSを使う主目的だったりする。ROSの本来の利用用途であるロボット遠隔操作には興味を持っていないので、その方面の記事を書くことはないだろう(ただし、ドローンには興味を持っているので、ドローンでのROS利用については記事を書くかもしれない)。

WebRTCやWebGLを使って動画配信環境を作る方法もあるが、これらは配信受信側がWebブラウザに限定されてしまう。アプリ上で動画配信を実現するには、UnityとROSを利用するのがいま一番手っ取り早い方法であり、実際にこの組み合わせによって実現されているスマホ用動画配信やゲームアプリがいくつか存在している。同じ目的を持っている人が多いようで、最近ROSとUnityへの関心度が上昇しているらしい。

SDKMANによるJava系言語開発環境の構築

だいぶん昔にJavaでデスクトップ・アプリを作ったことがあるが、本格的にAndroidアプリ開発に取り組むようになって、Javaプログラミングをまたやるようになった(JavaよりKotlinの方を使うことが多いが)。

Pythonほどではないが、Javaも複数のバージョンを使い分けなければならない場合があり、以前はUbuntuでは複数のバージョンのOpenJDKをインストールしてupdate-alternativesを使って切り替えていたが、SDKMANの存在を知ってから、これを利用するようになった。

SDKMANはJVMベース言語のバージョン管理ツールで、JavaだけでなくKotlinやScalaなどにも対応している。Java系言語はこれだけで複数のバージョンの開発環境を構築することができる。

sdkman.io

言語バージョン管理ツールをasdfに代えてから、新しいPCの開発環境ではSDKMANを利用していないが、古いPCの開発環境にはSDKMANが残っている。自分の備忘録として、SDKMANのインストールと使い方の要点を本記事に書いておく。

SDKMANのインストール

SDKMANのサイトに書いてあるとおり、以下のコマンドを実行するとインストールできる。

$ curl -s "https://get.sdkman.io" | bash

このコマンドを実行すると、~/.bashrcに以下の記述が追加される(~/.zshrcが存在する場合はそれにも)。

#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"

インストール後、下のコマンドを実行すればSDKMANが利用できるようになる。

$ source "$HOME/.sdkman/bin/sdkman-init.sh"

SDKMANによるJavaのインストール

SDKMANによって利用可能なJavaのバージョンを知るには、下のコマンドを実行する。

$ sdk list java

上のコマンドによって表示されるバージョンの中から任意のものを選択して、Javaをインストールできる。

$ sdk install 17.0.8-tem

Downloading: java 17.0.8-tem

In progress...

################################################################################################################################################################################################# 100.0%

Repackaging Java 17.0.8-tem...

Done repackaging...

Installing: java 17.0.8-tem
Done installing!


Setting java 17.0.8-tem as default.

SDKMANが対応している各言語にはデフォルトのインストール対象バージョンが設定されており、下のコマンドによって、そのデフォルトバージョンのJavaをインストールすることもできる。言語は使用するがバージョンは特に決めていない場合は、これをインストールしておけば良いだろう。

$ sdk install java

選択したバージョンのJavaがインストールできていることを確認しておく。

$ java --version
openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment Temurin-17.0.8+7 (build 17.0.8+7)
OpenJDK 64-Bit Server VM Temurin-17.0.8+7 (build 17.0.8+7, mixed mode, sharing)

いずれかのバージョンのJavaをインストールした後、再ログインすると、環境変数JAVA_HOMEが設定される。

$ exec $SHELL -l
$ echo $JAVA_HOME
/home/LOGINUSER/.sdkman/candidates/java/current

SDKMANによるKotlinのインストール

利用可能バージョン一覧の表示

$ sdk list kotlin

言語のインストール

  • 指定バージョンのインストール
$ sdk install kotlin 1.9.0
$ kotlin -version
Kotlin version 1.9.0-release-358 (JRE 17.0.8+7)
  • デフォルトバージョンのインストール
$ sdk install kotlin
$ kotlin -version

再ログインによる環境変数設定の確認

$ exec $SHELL -l
$ echo $KOTLIN_HOME
/home/LOGINUSER/.sdkman/candidates/kotlin/current

SDKMANによるMavenのインストール

利用可能バージョン一覧の表示

$ sdk list maven

言語のインストール

  • 指定バージョンのインストール
$ sdk install maven 3.9.4
$ mvn -version
Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
Maven home: /home/yuhri/.sdkman/candidates/maven/current
Java version: 17.0.8, vendor: Eclipse Adoptium, runtime: /home/yuhri/.sdkman/candidates/java/17.0.8-tem
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.16.15-76051615-generic", arch: "amd64", family: "unix"
  • デフォルトバージョンのインストール
$ sdk install maven
$ mvn -version

再ログインによる環境変数設定の確認

$ exec $SHELL -l
$ echo $MAVEN_HOME
/home/LOGINUSER/.sdkman/candidates/maven/current

SDKMANによるScalaのインストール

利用可能バージョン一覧の表示

$ sdk list scala

言語のインストール

  • 指定バージョンのインストール
$ sdk install scala 3.3.0
$ scala -version
Scala code runner version 3.3.0 -- Copyright 2002-2023, LAMP/EPFL
  • デフォルトバージョンのインストール
$ sdk install scala
$ scala -version

再ログインによる環境変数設定の確認

$ exec $SHELL -l
$ echo $SCALA_HOME
/home/LOGINUSER/.sdkman/candidates/scala/current

言語バージョンの設定

システム全体に適用されるグローバルな言語バージョンは以下のコマンドによって設定できる。

$ sdk default java 17.0.8-tem
$ java --version
openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment Temurin-17.0.8+7 (build 17.0.8+7)
OpenJDK 64-Bit Server VM Temurin-17.0.8+7 (build 17.0.8+7, mixed mode, sharing)

ターミナルの中で下のようなコマンドを実行すると、そのセッション限定で言語バージョンを変更することもできる。

$ sdk use java 17.0.8-tem
$ java --version
openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment Temurin-17.0.8+7 (build 17.0.8+7)
OpenJDK 64-Bit Server VM Temurin-17.0.8+7 (build 17.0.8+7, mixed mode, sharing)

【参照リンク】

sdkman.io

asdfことはじめ(anyenvから乗り換え)

前記事にanyenv + pyenv + PoetryによるPython仮想環境の構築方法を書いたが、最近言語バージョン管理ツールとしてasdfというものが存在することを知った。それで、新しい開発環境ではanyenvの代わりにasdfを使い始めた。

asdf-vm.com

asdfの良いところは現存のプログラミング言語を網羅的に対応していることだ。anyenvはPythonやNode.jsなどの人気のある言語には対応しているが、Java、Kotlin、MavenJava系言語)やFlutter/Dartには対応していない。それで、いままでanyenv、SDKMAN、FVM(Flutter Version Manager)を併用していた。asdfに代えてから、Python, Node.js/TypeScript, Java, Kotlin, Maven, Flutter/Dart、そしてSwift, Go, Lua, Rust, R, Erlang, Elixirなど私が使うすべてのプログラミング言語をこれだけでカバーできるようになった。また、JSON, Docker, Terraformなどの定義記述系言語にも対応していて、asdfだけでこれらも利用できる。

自分の備忘録として、本記事にasdfによるPythonのインストール手順と使い方の要点を書いておく。

asdfのインストール

$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.12.0
% brew install asdf

asdfのコマンドパスを設定

Ubuntu

$ vi ~/.bashrc
. "$HOME/.asdf/asdf.sh"
$ source ~/.bashrc
% vi ~/.zshrc
. "$HOME/.asdf/asdf.sh"
% source ~/.zshrc

Mac

$ echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.bashrc
$ source ~/.bashrc
% echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.zshrc
% source ~/.zshrc

asdfによるPythonのインストール

$ asdf plugin list all
initializing plugin repository...Cloning into '/Users/LOGINUSER/.asdf/repository'...
....    ....
....    ....
1password-cli                 https://github.com/NeoHsu/asdf-1password-cli.git
R                             https://github.com/asdf-community/asdf-r.git
act                           https://github.com/grimoh/asdf-act.git
action-validator              https://github.com/mpalmer/action-validator.git
actionlint                    https://github.com/crazy-matt/asdf-actionlint.git
adr-tools                     https://gitlab.com/td7x/asdf/adr-tools.git
ag                            https://github.com/koketani/asdf-ag.git
age                           https://github.com/threkk/asdf-age
age-plugin-yubikey            https://github.com/joke/asdf-age-plugin-yubikey
agebox                        https://github.com/slok/asdf-agebox.git
air                           https://github.com/pdemagny/asdf-air
aks-engine                    https://github.com/robsonpeixoto/asdf-aks-engine.git
alias                         https://github.com/andrewthauer/asdf-alias.git
allure                        https://github.com/comdotlinux/asdf-allure.git
alp                           https://github.com/asdf-community/asdf-alp.git
amass                         https://github.com/dhoeric/asdf-amass.git
amazon-ecr-credential-helper  https://github.com/dex4er/asdf-amazon-ecr-credential-helper.git
ambient                       https://github.com/jtakakura/asdf-ambient.git
ansible-base                  https://github.com/amrox/asdf-pyapp.git
ant                           https://github.com/jackboespflug/asdf-ant.git
apollo-router                 https://github.com/safx/asdf-apollo-router.git
arc                           https://github.com/ORCID/asdf-arc.git
argo                          https://github.com/sudermanjr/asdf-argo.git
argo-rollouts                 https://github.com/abatilo/asdf-argo-rollouts.git
argocd                        https://github.com/beardix/asdf-argocd.git
aria2                         https://github.com/asdf-community/asdf-aria2.git
asciidoctorj                  https://github.com/gliwka/asdf-asciidoctorj.git
assh                          https://github.com/zekker6/asdf-assh.git
aws-amplify-cli               https://github.com/LozanoMatheus/asdf-aws-amplify-cli.git
aws-copilot                   https://github.com/NeoHsu/asdf-copilot
aws-iam-authenticator         https://github.com/zekker6/asdf-aws-iam-authenticator
aws-nuke                      https://github.com/bersalazar/asdf-aws-nuke.git
aws-sam-cli                   https://github.com/amrox/asdf-pyapp.git
aws-sso-cli                   https://github.com/adamcrews/asdf-aws-sso-cli.git
aws-vault                     https://github.com/karancode/asdf-aws-vault.git
awscli                        https://github.com/MetricMike/asdf-awscli.git
awscli-local                  https://github.com/paulo-ferraz-oliveira/asdf-awscli-local
awsebcli                      https://github.com/amrox/asdf-pyapp.git
awsls                         https://github.com/chessmango/asdf-awsls.git
awsrm                         https://github.com/chessmango/asdf-awsrm.git
awsweeper                     https://github.com/chessmango/asdf-awsweeper.git
azure-cli                     https://github.com/EcoMind/asdf-azure-cli.git
azure-functions-core-tools    https://github.com/daveneeley/asdf-azure-functions-core-tools.git
babashka                      https://github.com/pitch-io/asdf-babashka.git
balena-cli                    https://github.com/boatkit-io/asdf-balena-cli
bashbot                       https://github.com/mathew-fleisch/asdf-bashbot.git
bat                           https://gitlab.com/wt0f/asdf-bat.git
batect                        https://github.com/johnlayton/asdf-batect.git
bats                          https://github.com/timgluz/asdf-bats.git
bazel                         https://github.com/rajatvig/asdf-bazel.git
bbr                           https://github.com/vmware-tanzu/tanzu-plug-in-for-asdf.git
bbr-s3-config-validator       https://github.com/vmware-tanzu/tanzu-plug-in-for-asdf.git
benthos                       https://github.com/benthosdev/benthos-asdf.git
bin                           https://github.com/joe733/asdf-bin.git
binnacle                      https://github.com/Traackr/asdf-binnacle.git
bitwarden                     https://github.com/vixus0/asdf-bitwarden.git
bombardier                    https://github.com/NeoHsu/asdf-bombardier.git
borg                          https://github.com/lwiechec/asdf-borg
bosh                          https://github.com/vmware-tanzu/tanzu-plug-in-for-asdf.git
bottom                        https://github.com/carbonteq/asdf-btm.git
boundary                      https://github.com/asdf-community/asdf-hashicorp.git
bpkg                          https://github.com/bpkg/asdf-bpkg.git
brig                          https://github.com/Ibotta/asdf-brig.git
btrace                        https://github.com/joschi/asdf-btrace.git
buf                           https://github.com/truepay/asdf-buf.git
buildpack                     https://github.com/johnlayton/asdf-buildpack.git
bun                           https://github.com/cometkim/asdf-bun.git
bundler                       https://github.com/jonathanmorley/asdf-bundler.git
caddy                         https://github.com/salasrod/asdf-caddy.git
calicoctl                     https://github.com/TheCubicleJockey/asdf-calicoctl.git
camunda-modeler               https://github.com/barmac/asdf-camunda-modeler.git
cargo-make                    https://github.com/kachick/asdf-cargo-make.git
carp                          https://github.com/susurri/asdf-carp.git
carthage                      https://github.com/younke/asdf-carthage.git
ccache                        https://github.com/asdf-community/asdf-ccache.git
certstrap                     https://github.com/carnei-ro/asdf-certstrap.git
cf                            https://github.com/mattysweeps/asdf-cf.git
cfssl                         https://github.com/mathew-fleisch/asdf-cfssl.git
chamber                       https://github.com/mintel/asdf-chamber
cheat                         https://github.com/jmoratilla/asdf-cheat-plugin
checkov                       https://github.com/bosmak/asdf-checkov.git
chezmoi                       https://github.com/joke/asdf-chezmoi.git
chezscheme                    https://github.com/asdf-community/asdf-chezscheme.git
chicken                       https://github.com/evhan/asdf-chicken.git
choose                        https://github.com/carbonteq/asdf-choose.git
chromedriver                  https://github.com/schinckel/asdf-chromedriver.git
cidr-merger                   https://github.com/ORCID/asdf-cidr-merger.git
cidrchk                       https://github.com/ORCID/asdf-cidrchk.git
cilium-cli                    https://github.com/carnei-ro/asdf-cilium-cli.git
cilium-hubble                 https://github.com/NitriKx/asdf-cilium-hubble.git
circleci-cli                  https://github.com/ucpr/asdf-circleci-cli.git
clojure                       https://github.com/asdf-community/asdf-clojure.git
cloud-sql-proxy               https://github.com/pbr0ck3r/asdf-cloud-sql-proxy.git
cloudflared                   https://github.com/threkk/asdf-cloudflared
clusterawsadm                 https://github.com/kahun/asdf-clusterawsadm.git
clusterctl                    https://github.com/pfnet-research/asdf-clusterctl.git
cmake                         https://github.com/asdf-community/asdf-cmake.git
cmctl                         https://github.com/asdf-community/asdf-cmctl.git
cockroach                     https://github.com/salasrod/asdf-cockroach.git
cocoapods                     https://github.com/ronnnnn/asdf-cocoapods.git
codefresh                     https://github.com/gurukulkarni/asdf-codefresh.git
codeql                        https://github.com/bored-engineer/asdf-codeql.git
colima                        https://github.com/CrouchingMuppet/asdf-colima.git
conan                         https://github.com/amrox/asdf-pyapp.git
concourse                     https://github.com/mattysweeps/asdf-concourse.git
conduit                       https://github.com/gmcabrita/asdf-conduit.git
conform                       https://github.com/skyzyx/asdf-conform.git
conftest                      https://github.com/looztra/asdf-conftest.git
consul                        https://github.com/asdf-community/asdf-hashicorp.git
container-diff                https://github.com/cgroschupp/asdf-container-diff.git
container-structure-test      https://github.com/jonathanmorley/asdf-container-structure-test.git
cookiecutter                  https://github.com/shawon-crosen/asdf-cookiecutter.git
copper                        https://github.com/vladlosev/asdf-copper.git
coq                           https://github.com/gingerhot/asdf-coq.git
cosign                        https://gitlab.com/wt0f/asdf-cosign.git
coursier                      https://github.com/jiahuili430/asdf-coursier.git
crane                         https://github.com/dmpe/asdf-crane
crc                           https://github.com/sqtran/asdf-crc.git
credhub                       https://github.com/vmware-tanzu/tanzu-plug-in-for-asdf.git
crictl                        https://github.com/FairwindsOps/asdf-crictl.git
crossplane-cli                https://github.com/joke/asdf-crossplane-cli.git
crystal                       https://github.com/asdf-community/asdf-crystal.git
ctlptl                        https://github.com/ezcater/asdf-ctlptl.git
ctop                          https://github.com/NeoHsu/asdf-ctop.git
cue                           https://github.com/asdf-community/asdf-cue.git
cyclonedx                     https://github.com/xeedio/asdf-cyclonedx.git
dagger                        https://github.com/virtualstaticvoid/asdf-dagger.git
dart                          https://github.com/PatOConnor43/asdf-dart.git
dasel                         https://github.com/asdf-community/asdf-dasel.git
datree                        https://github.com/lukeab/asdf-datree.git
dbmate                        https://github.com/juusujanar/asdf-dbmate.git
deck                          https://github.com/nutellinoit/asdf-deck.git
delta                         https://github.com/andweeb/asdf-delta.git
deno                          https://github.com/asdf-community/asdf-deno.git
dep                           https://github.com/paxosglobal/asdf-dep.git
depot                         https://github.com/depot/asdf-depot.git
desk                          https://github.com/endorama/asdf-desk.git
devspace                      https://github.com/NeoHsu/asdf-devspace.git
dhall                         https://github.com/aaaaninja/asdf-dhall.git
difftastic                    https://github.com/volf52/asdf-difftastic.git
digdag                        https://github.com/jtakakura/asdf-digdag.git
direnv                        https://github.com/asdf-community/asdf-direnv.git
dive                          https://github.com/looztra/asdf-dive.git
djinni                        https://github.com/cross-language-cpp/asdf-djinni.git
dmd                           https://github.com/sylph01/asdf-dmd.git
docker-compose-v1             https://github.com/yilas/asdf-docker-compose-v1
docker-slim                   https://github.com/xataz/asdf-docker-slim.git
dockle                        https://github.com/mathew-fleisch/asdf-dockle.git
doctl                         https://github.com/maristgeek/asdf-doctl.git
doctoolchain                  https://github.com/joschi/asdf-doctoolchain
docuum                        https://github.com/bradym/asdf-docuum.git
dome                          https://github.com/jtakakura/asdf-dome.git
doppler                       https://github.com/takutakahashi/asdf-doppler.git
dotenv-linter                 https://github.com/wesleimp/asdf-dotenv-linter.git
dotnet                        https://github.com/hensou/asdf-dotnet
dotnet-core                   https://github.com/emersonsoares/asdf-dotnet-core.git
dotty                         https://github.com/asdf-community/asdf-dotty.git
dprint                        https://github.com/asdf-community/asdf-dprint
draft                         https://github.com/kristoflemmens/asdf-draft.git
driftctl                      https://github.com/nlamirault/asdf-driftctl.git
drone                         https://github.com/virtualstaticvoid/asdf-drone.git
dtm                           https://github.com/zhenyuanlau/asdf-dtm.git
duf                           https://github.com/NeoHsu/asdf-duf.git
dust                          https://github.com/looztra/asdf-dust.git
dvc                           https://github.com/fwfurtado/asdf-dvc.git
dyff                          https://gitlab.com/wt0f/asdf-dyff.git
ecspresso                     https://github.com/kayac/asdf-ecspresso.git
editorconfig-checker          https://github.com/gabitchov/asdf-editorconfig-checker.git
ejson                         https://github.com/cipherstash/asdf-ejson.git
eksctl                        https://github.com/elementalvoid/asdf-eksctl.git
elasticsearch                 https://github.com/asdf-community/asdf-elasticsearch.git
elixir                        https://github.com/asdf-vm/asdf-elixir.git
elm                           https://github.com/asdf-community/asdf-elm.git
embulk                        https://github.com/yuokada/asdf-embulk.git
emsdk                         https://github.com/RobLoach/asdf-emsdk.git
envcli                        https://github.com/zekker6/asdf-envcli.git
ephemeral-postgres            https://github.com/smashedtoatoms/asdf-ephemeral-postgres.git
erlang                        https://github.com/asdf-vm/asdf-erlang.git
esy                           https://github.com/asdf-community/asdf-esy.git
etcd                          https://github.com/particledecay/asdf-etcd.git
evans                         https://github.com/goki90210/asdf-evans.git
exa                           https://github.com/nyrst/asdf-exa.git
fd                            https://gitlab.com/wt0f/asdf-fd.git
ffmpeg                        https://github.com/acj/asdf-ffmpeg
figma-export                  https://github.com/younke/asdf-figma-export.git
fillin                        https://github.com/ouest/asdf-fillin
firebase                      https://github.com/jthegedus/asdf-firebase.git
fission                       https://github.com/virtualstaticvoid/asdf-fission.git
flarectl                      https://github.com/ORCID/asdf-flarectl.git
flatc                         https://github.com/TheOpenDictionary/asdf-flatc.git
flutter                       https://github.com/oae/asdf-flutter.git
flux2                         https://github.com/tablexi/asdf-flux2.git
fluxctl                       https://github.com/stefansedich/asdf-fluxctl.git
fly                           https://github.com/vmware-tanzu/tanzu-plug-in-for-asdf.git
flyctl                        https://github.com/chessmango/asdf-flyctl.git
flyway                        https://github.com/junminahn/asdf-flyway.git
func-e                        https://github.com/carnei-ro/asdf-func-e.git
furyctl                       https://github.com/sighupio/asdf-furyctl.git
fx                            https://gitlab.com/wt0f/asdf-fx.git
fzf                           https://github.com/kompiro/asdf-fzf.git
gallery-dl                    https://github.com/iul1an/asdf-gallery-dl
gam                           https://github.com/offbyone/asdf-gam.git
gator                         https://github.com/MxNxPx/asdf-gator.git
gauche                        https://github.com/sakuro/asdf-gauche.git
gcc-arm-none-eabi             https://github.com/dlech/asdf-gcc-arm-none-eabi.git
gcloud                        https://github.com/jthegedus/asdf-gcloud.git
getenvoy                      https://github.com/asdf-community/asdf-getenvoy.git
ghidra                        https://github.com/Honeypot95/asdf-ghidra.git
ghorg                         https://github.com/gbloquel/asdf-ghorg.git
ghq                           https://github.com/kajisha/asdf-ghq.git
ginkgo                        https://github.com/jimmidyson/asdf-ginkgo.git
git                           https://gitlab.com/jcaigitlab/asdf-git.git
git-chglog                    https://github.com/GoodwayGroup/asdf-git-chglog.git
gitconfig                     https://github.com/0ghny/asdf-gitconfig.git
github-cli                    https://github.com/bartlomiejdanek/asdf-github-cli.git
github-markdown-toc           https://github.com/skyzyx/asdf-github-markdown-toc.git
gitleaks                      https://github.com/jmcvetta/asdf-gitleaks.git
gitsign                       https://github.com/spencergilbert/asdf-gitsign.git
gitui                         https://github.com/looztra/asdf-gitui.git
glab                          https://github.com/particledecay/asdf-glab.git
gleam                         https://github.com/vic/asdf-gleam.git
glen                          https://github.com/bradym/asdf-glen
glooctl                       https://github.com/halilkaya/asdf-glooctl.git
glow                          https://github.com/chessmango/asdf-glow.git
go-containerregistry          https://github.com/dex4er/asdf-go-containerregistry.git
go-getter                     https://github.com/ryodocx/asdf-go-getter.git
go-jira                       https://github.com/dguihal/asdf-go-jira.git
go-jsonnet                    https://gitlab.com/craigfurman/asdf-go-jsonnet.git
go-junit-report               https://github.com/jwillker/asdf-go-junit-report.git
go-sdk                        https://github.com/yacchi/asdf-go-sdk.git
go-swagger                    https://github.com/jfreeland/asdf-go-swagger.git
goconvey                      https://github.com/therounds-contrib/asdf-goconvey.git
gofumpt                       https://github.com/looztra/asdf-gofumpt.git
gohugo                        https://github.com/nklmilojevic/asdf-hugo.git
gojq                          https://github.com/jimmidyson/asdf-gojq.git
golang                        https://github.com/asdf-community/asdf-golang.git
golangci-lint                 https://github.com/hypnoglow/asdf-golangci-lint.git
gomigrate                     https://github.com/joschi/asdf-gomigrate.git
gomplate                      https://github.com/sneakybeaky/asdf-gomplate.git
gopass                        https://github.com/trallnag/asdf-gopass.git
goreleaser                    https://github.com/kforsthoevel/asdf-goreleaser.git
goss                          https://github.com/raimon49/asdf-goss.git
graalvm                       https://github.com/asdf-community/asdf-graalvm.git
gradle                        https://github.com/rfrancis/asdf-gradle.git
gradle-profiler               https://github.com/joschi/asdf-gradle-profiler.git
grails                        https://github.com/weibemoura/asdf-grails.git
grain                         https://github.com/cometkim/asdf-grain.git
granted                       https://github.com/dex4er/asdf-granted.git
grex                          https://github.com/ouest/asdf-grex
groovy                        https://github.com/weibemoura/asdf-groovy.git
grpc-health-probe             https://github.com/zufardhiyaulhaq/asdf-grpc-health-probe.git
grpcurl                       https://github.com/asdf-community/asdf-grpcurl.git
grype                         https://github.com/poikilotherm/asdf-grype.git
guile                         https://github.com/indiebrain/asdf-guile.git
gum                           https://github.com/lwiechec/asdf-gum
gwvault                       https://github.com/GoodwayGroup/asdf-gwvault.git
hadolint                      https://github.com/devlincashman/asdf-hadolint.git
hamler                        https://github.com/scudelletti/asdf-hamler.git
has                           https://github.com/sylvainmetayer/asdf-has
haskell                       https://github.com/asdf-community/asdf-haskell.git
hasura-cli                    https://github.com/gurukulkarni/asdf-hasura.git
haxe                          https://github.com/asdf-community/asdf-haxe.git
hcl2json                      https://github.com/dex4er/asdf-hcl2json.git
hcloud                        https://github.com/chessmango/asdf-hcloud.git
helm                          https://github.com/Antiarchitect/asdf-helm.git
helm-cr                       https://github.com/Antiarchitect/asdf-helm-cr.git
helm-ct                       https://github.com/tablexi/asdf-helm-ct.git
helm-diff                     https://github.com/dex4er/asdf-helm-diff.git
helm-docs                     https://github.com/sudermanjr/asdf-helm-docs.git
helmfile                      https://github.com/feniix/asdf-helmfile.git
helmsman                      https://github.com/luisdavim/asdf-helmsman
heroku-cli                    https://github.com/treilly94/asdf-heroku-cli.git
hey                           https://github.com/raimon49/asdf-hey.git
httpie-go                     https://github.com/abatilo/asdf-httpie-go.git
hub                           https://github.com/vixus0/asdf-hub.git
hugo                          https://github.com/NeoHsu/asdf-hugo.git
hurl                          https://github.com/raimon49/asdf-hurl.git
hwatch                        https://github.com/chessmango/asdf-hwatch.git
hygen                         https://github.com/brentjanderson/asdf-hygen.git
hyperfine                     https://github.com/volf52/asdf-hyperfine.git
iam-policy-json-to-terraform  https://github.com/carlduevel/asdf-iam-policy-json-to-terraform.git
iamlive                       https://github.com/chessmango/asdf-iamlive.git
ibmcloud                      https://github.com/triangletodd/asdf-ibmcloud.git
idris                         https://github.com/asdf-community/asdf-idris.git
idris2                        https://github.com/asdf-community/asdf-idris2.git
imagemagick                   https://github.com/mangalakader/asdf-imagemagick.git
imgpkg                        https://github.com/vmware-tanzu/asdf-carvel.git
infracost                     https://github.com/dex4er/asdf-infracost.git
inlets                        https://github.com/nlamirault/asdf-inlets.git
io                            https://github.com/mracos/asdf-io.git
istioctl                      https://github.com/virtualstaticvoid/asdf-istioctl.git
janet                         https://github.com/Jakski/asdf-janet.git
java                          https://github.com/halcyon/asdf-java.git
jb                            https://github.com/beardix/asdf-jb.git
jbang                         https://github.com/joschi/asdf-jbang.git
jib                           https://github.com/joschi/asdf-jib.git
jiq                           https://github.com/chessmango/asdf-jiq.git
jless                         https://github.com/jc00ke/asdf-jless.git
jmespath                      https://github.com/skyzyx/asdf-jmespath.git
jmeter                        https://github.com/comdotlinux/asdf-jmeter
jq                            https://github.com/lsanwick/asdf-jq.git
jqp                           https://gitlab.com/wt0f/asdf-jqp.git
jreleaser                     https://github.com/joschi/asdf-jreleaser.git
jsonnet                       https://github.com/Banno/asdf-jsonnet.git
julia                         https://github.com/rkyleg/asdf-julia.git
just                          https://github.com/olofvndrhr/asdf-just.git
jx                            https://github.com/vbehar/asdf-jx.git
k0sctl                        https://github.com/Its-Alex/asdf-plugin-k0sctl.git
k14s                          https://github.com/k14s/asdf-k14s.git
k2tf                          https://github.com/carlduevel/asdf-k2tf.git
k3d                           https://github.com/spencergilbert/asdf-k3d.git
k3sup                         https://github.com/cgroschupp/asdf-k3sup.git
k6                            https://github.com/grimoh/asdf-k6.git
k9s                           https://github.com/looztra/asdf-k9s.git
kafka                         https://github.com/ueisele/asdf-kafka.git
kafkactl                      https://github.com/anweber/asdf-kafkactl.git
kapp                          https://github.com/vmware-tanzu/asdf-carvel.git
kbld                          https://github.com/vmware-tanzu/asdf-carvel.git
kcat                          https://github.com/douglasdgoulart/asdf-kcat.git
kcctl                         https://github.com/joschi/asdf-kcctl.git
kconf                         https://github.com/particledecay/asdf-kconf.git
ki                            https://github.com/comdotlinux/asdf-ki
kind                          https://github.com/johnlayton/asdf-kind.git
kiota                         https://github.com/asdf-community/asdf-kiota.git
kn                            https://github.com/joke/asdf-kn.git
ko                            https://github.com/zasdaym/asdf-ko.git
koka                          https://github.com/susurri/asdf-koka.git
kompose                       https://github.com/technikhil314/asdf-kompose.git
kops                          https://github.com/Antiarchitect/asdf-kops.git
kotlin                        https://github.com/asdf-community/asdf-kotlin.git
kp                            https://github.com/vmware-tanzu/tanzu-plug-in-for-asdf.git
kpt                           https://github.com/nlamirault/asdf-kpt.git
krab                          https://github.com/ohkrab/asdf-krab.git
krew                          https://github.com/bjw-s/asdf-krew.git
kscript                       https://github.com/edgelevel/asdf-kscript.git
ksonnet                       https://github.com/Banno/asdf-ksonnet.git
ktlint                        https://github.com/esensar/asdf-ktlint.git
kube-capacity                 https://github.com/looztra/asdf-kube-capacity.git
kube-code-generator           https://github.com/jimmidyson/asdf-kube-code-generator.git
kube-controller-tools         https://github.com/jimmidyson/asdf-kube-controller-tools.git
kube-credential-cache         https://github.com/ryodocx/kube-credential-cache.git
kube-linter                   https://github.com/devlincashman/asdf-kube-linter.git
kube-score                    https://github.com/bageljp/asdf-kube-score.git
kubebuilder                   https://github.com/virtualstaticvoid/asdf-kubebuilder.git
kubecm                        https://github.com/samhvw8/asdf-kubecm
kubecolor                     https://github.com/dex4er/asdf-kubecolor.git
kubeconform                   https://github.com/lirlia/asdf-kubeconform.git
kubectl                       https://github.com/asdf-community/asdf-kubectl.git
kubectl-bindrole              https://github.com/looztra/asdf-kubectl-bindrole.git
kubectl-buildkit              https://github.com/ezcater/asdf-kubectl-buildkit.git
kubectl-convert               https://github.com/iul1an/asdf-kubectl-convert.git
kubectl-kots                  https://github.com/ganta/asdf-kubectl-kots.git
kubectx                       https://gitlab.com/wt0f/asdf-kubectx.git
kubefedctl                    https://github.com/kvokka/asdf-kubefedctl.git
kubefirst                     https://github.com/Claywd/asdf-kubefirst
kubelogin                     https://github.com/sechmann/asdf-kubelogin.git
kubemqctl                     https://github.com/johnlayton/asdf-kubemqctl.git
kubent                        https://github.com/virtualstaticvoid/asdf-kubent.git
kubergrunt                    https://github.com/NeoHsu/asdf-kubergrunt.git
kubeseal                      https://github.com/stefansedich/asdf-kubeseal.git
kubesec                       https://github.com/vitalis/asdf-kubesec.git
kubeshark                     https://github.com/carnei-ro/asdf-kubeshark.git
kubespy                       https://github.com/jfreeland/asdf-kubespy.git
kubeval                       https://github.com/stefansedich/asdf-kubeval.git
kubevela                      https://github.com/gustavclausen/asdf-kubevela.git
kubie                         https://github.com/johnhamelink/asdf-kubie.git
kustomize                     https://github.com/Banno/asdf-kustomize.git
kuttl                         https://github.com/jimmidyson/asdf-kuttl.git
kwt                           https://github.com/vmware-tanzu/asdf-carvel.git
lab                           https://github.com/particledecay/asdf-lab.git
lazygit                       https://github.com/nklmilojevic/asdf-lazygit.git
lean                          https://github.com/asdf-community/asdf-lean.git
lefthook                      https://github.com/jtzero/asdf-lefthook.git
leiningen                     https://github.com/miorimmax/asdf-lein.git
levant                        https://github.com/asdf-community/asdf-hashicorp.git
lfe                           https://github.com/asdf-community/asdf-lfe.git
lima                          https://github.com/CrouchingMuppet/asdf-lima.git
link                          https://github.com/asdf-community/asdf-link.git
linkerd                       https://github.com/kforsthoevel/asdf-linkerd.git
liqoctl                       https://github.com/pdemagny/asdf-liqoctl
litestream                    https://github.com/threkk/asdf-litestream
logtalk                       https://github.com/LogtalkDotOrg/asdf-logtalk.git
loki-logcli                   https://github.com/comdotlinux/asdf-loki-logcli.git
lua                           https://github.com/Stratus3D/asdf-lua.git
lua-language-server           https://github.com/bellini666/asdf-lua-language-server
luaJIT                        https://github.com/smashedtoatoms/asdf-luaJIT.git
lucy                          https://github.com/cometkim/asdf-lucy.git
maestro                       https://github.com/dotanuki-labs/asdf-maestro.git
mage                          https://github.com/mathew-fleisch/asdf-mage.git
make                          https://github.com/yacchi/asdf-make.git
mani                          https://github.com/anweber/asdf-mani.git
mark                          https://github.com/jfreeland/asdf-mark.git
markdownlint-cli2             https://github.com/paulo-ferraz-oliveira/asdf-markdownlint-cli2
marp-cli                      https://github.com/xataz/asdf-marp-cli
mask                          https://github.com/aaaaninja/asdf-mask.git
maven                         https://github.com/halcyon/asdf-maven.git
mc                            https://github.com/penpyt/asdf-mc.git
mdbook                        https://github.com/cipherstash/asdf-mdbook.git
mdbook-linkcheck              https://github.com/cipherstash/asdf-mdbook-linkcheck.git
melt                          https://github.com/chessmango/asdf-melt.git
memcached                     https://github.com/furkanural/asdf-memcached
mercury                       https://github.com/susurri/asdf-mercury.git
meson                         https://github.com/asdf-community/asdf-meson.git
micronaut                     https://github.com/weibemoura/asdf-micronaut.git
mill                          https://github.com/asdf-community/asdf-mill.git
minify                        https://github.com/axilleas/asdf-minify
minikube                      https://github.com/alvarobp/asdf-minikube.git
minio                         https://github.com/aeons/asdf-minio.git
minishift                     https://github.com/sqtran/asdf-minishift.git
mint                          https://github.com/mint-lang/asdf-mint
mitmproxy                     https://github.com/NeoHsu/asdf-mitmproxy.git
mkcert                        https://github.com/salasrod/asdf-mkcert.git
mlton                         https://github.com/asdf-community/asdf-mlton.git
mockery                       https://github.com/cabify/asdf-mockery.git
mongo-tools                   https://github.com/itspngu/asdf-mongo-tools.git
mongodb                       https://github.com/sylph01/asdf-mongodb.git
mongosh                       https://github.com/itspngu/asdf-mongosh.git
mutanus                       https://github.com/SoriUR/asdf-mutanus.git
mvnd                          https://github.com/joschi/asdf-mvnd.git
mysql                         https://github.com/iroddis/asdf-mysql.git
nancy                         https://github.com/iilyak/asdf-nancy.git
nano                          https://github.com/mfakane/asdf-nano.git
nasm                          https://github.com/Dpbm/asdf-nasm.git
neko                          https://github.com/asdf-community/asdf-neko.git
neovim                        https://github.com/richin13/asdf-neovim.git
nerdctl                       https://github.com/dmpe/asdf-nerdctl
newrelic-cli                  https://github.com/NeoHsu/asdf-newrelic-cli.git
nfpm                          https://github.com/ORCID/asdf-nfpm
nim                           https://github.com/asdf-community/asdf-nim.git
ninja                         https://github.com/asdf-community/asdf-ninja.git
nodejs                       *https://github.com/asdf-vm/asdf-nodejs.git
nomad                         https://github.com/asdf-community/asdf-hashicorp.git
nova                          https://github.com/elementalvoid/asdf-nova.git
nsc                           https://github.com/dex4er/asdf-nsc.git
oapi-codegen                  https://github.com/dylanrayboss/asdf-oapi-codegen.git
oc                            https://github.com/sqtran/asdf-oc.git
ocaml                         https://github.com/asdf-community/asdf-ocaml.git
oci                           https://github.com/yasn77/asdf-oci.git
odin                          https://github.com/jtakakura/asdf-odin
odo                           https://github.com/rm3l/asdf-odo.git
okta-aws-cli                  https://github.com/bennythejudge/asdf-plugin-okta-aws-cli.git
okteto                        https://github.com/BradenM/asdf-okteto
om                            https://github.com/vmware-tanzu/tanzu-plug-in-for-asdf.git
opa                           https://github.com/tochukwuvictor/asdf-opa.git
opam                          https://github.com/asdf-community/asdf-opam.git
openfaas-faas-cli             https://github.com/zekker6/asdf-faas-cli.git
openresty                     https://github.com/smashedtoatoms/asdf-openresty.git
opensearch                    https://github.com/randikabanura/asdf-opensearch.git
opensearch-cli                https://github.com/iul1an/asdf-opensearch-cli.git
openshift-install             https://github.com/hhemied/asdf-openshift-install.git
operator-sdk                  https://github.com/Medium/asdf-operator-sdk.git
opsgenie-lamp                 https://github.com/ORCID/asdf-opsgenie-lamp
osm                           https://github.com/nlamirault/asdf-osm.git
osqueryi                      https://github.com/davidecavestro/asdf-osqueryi.git
pachctl                       https://github.com/abatilo/asdf-pachctl.git
packer                        https://github.com/asdf-community/asdf-hashicorp.git
patat                         https://github.com/airtonix/asdf-patat.git
pdm                           https://github.com/1oglop1/asdf-pdm
peco                          https://github.com/asdf-community/asdf-peco.git
perl                          https://github.com/ouest/asdf-perl.git
php                           https://github.com/asdf-community/asdf-php.git
pint                          https://github.com/sam-burrell/asdf-pint.git
pipectl                       https://github.com/pipe-cd/asdf-pipectl.git
pipx                          https://github.com/joe733/asdf-pipx.git
pivnet                        https://github.com/vmware-tanzu/tanzu-plug-in-for-asdf.git
please                        https://github.com/asdf-community/asdf-please.git
pluto                         https://github.com/FairwindsOps/asdf-pluto.git
pnpm                          https://github.com/jonathanmorley/asdf-pnpm.git
poetry                        https://github.com/asdf-community/asdf-poetry.git
polaris                       https://github.com/particledecay/asdf-polaris.git
popeye                        https://github.com/nlamirault/asdf-popeye.git
postgres                      https://github.com/smashedtoatoms/asdf-postgres.git
powerline-go                  https://github.com/dex4er/asdf-powerline-go.git
powershell-core               https://github.com/daveneeley/asdf-powershell-core.git
pre-commit                    https://github.com/jonathanmorley/asdf-pre-commit.git
protoc                        https://github.com/paxosglobal/asdf-protoc.git
protoc-gen-go                 https://github.com/pbr0ck3r/asdf-protoc-gen-go.git
protoc-gen-go-grpc            https://github.com/pbr0ck3r/asdf-protoc-gen-go-grpc.git
protoc-gen-grpc-web           https://github.com/pbr0ck3r/asdf-protoc-gen-grpc-web.git
protoc-gen-js                 https://github.com/pbr0ck3r/asdf-protoc-gen-js.git
protolint                     https://github.com/spencergilbert/asdf-protolint.git
protonge                      https://github.com/augustobmoura/asdf-protonge.git
psc-package                   https://github.com/nsaunders/asdf-psc-package.git
pulumi                        https://github.com/canha/asdf-pulumi.git
purerl                        https://github.com/GoNZooo/asdf-purerl.git
purescript                    https://github.com/nsaunders/asdf-purescript.git
purty                         https://github.com/nsaunders/asdf-purty.git
python                       *https://github.com/danhper/asdf-python.git
qdns                          https://github.com/moritz-makandra/asdf-plugin-qdns.git
quarkus                       https://github.com/asdf-community/asdf-quarkus.git
rabbitmq                      https://github.com/w-sanches/asdf-rabbitmq.git
racket                        https://github.com/asdf-community/asdf-racket.git
raku                          https://github.com/m-dango/asdf-raku.git
rancher                       https://github.com/abinet/asdf-rancher.git
rbac-lookup                   https://github.com/looztra/asdf-rbac-lookup.git
rclone                        https://github.com/johnlayton/asdf-rclone.git
rebar                         https://github.com/Stratus3D/asdf-rebar.git
reckoner                      https://github.com/FairwindsOps/asdf-reckoner.git
redis                         https://github.com/smashedtoatoms/asdf-redis.git
redis-cli                     https://github.com/NeoHsu/asdf-redis-cli.git
redo                          https://github.com/chessmango/asdf-redo.git
redskyctl                     https://github.com/sudermanjr/asdf-redskyctl.git
reg                           https://github.com/looztra/asdf-reg.git
regctl                        https://github.com/ORCID/asdf-regctl.git
restic                        https://github.com/xataz/asdf-restic
revive                        https://github.com/bjw-s/asdf-revive.git
richgo                        https://github.com/paxosglobal/asdf-richgo.git
riff                          https://github.com/abinet/asdf-riff.git
ripgrep                       https://gitlab.com/wt0f/asdf-ripgrep.git
rke                           https://github.com/particledecay/asdf-rke.git
rlwrap                        https://github.com/asdf-community/asdf-rlwrap.git
rome                          https://github.com/kichiemon/asdf-rome.git
rstash                        https://github.com/carlduevel/asdf-rstash.git
ruby                          https://github.com/asdf-vm/asdf-ruby.git
rust                          https://github.com/code-lever/asdf-rust.git
rust-analyzer                 https://github.com/Xyven1/asdf-rust-analyzer
rye                           https://github.com/Azuki-bar/asdf-rye
saml2aws                      https://github.com/elementalvoid/asdf-saml2aws.git
sbcl                          https://github.com/smashedtoatoms/asdf-sbcl.git
sbt                           https://github.com/bram2000/asdf-sbt.git
scala                         https://github.com/asdf-community/asdf-scala.git
scaleway-cli                  https://github.com/albarralnunez/asdf-plugin-scaleway-cli
scalingo-cli                  https://github.com/brandon-welsch/asdf-scalingo-cli.git
scarb                         https://github.com/software-mansion/asdf-scarb.git
sccache                       https://github.com/emersonmx/asdf-sccache.git
scenery                       https://github.com/skyzyx/asdf-scenery.git
schemacrawler                 https://github.com/davidecavestro/asdf-schemacrawler.git
seed7                         https://github.com/susurri/asdf-seed7.git
semgrep                       https://github.com/brentjanderson/asdf-semgrep.git
semtag                        https://github.com/junminahn/asdf-semtag
semver                        https://github.com/mathew-fleisch/asdf-semver.git
sentinel                      https://github.com/asdf-community/asdf-hashicorp.git
serf                          https://github.com/asdf-community/asdf-hashicorp.git
serverless                    https://github.com/pdemagny/asdf-serverless.git
shell2http                    https://github.com/ORCID/asdf-shell2http.git
shellcheck                    https://github.com/luizm/asdf-shellcheck.git
shellspec                     https://github.com/poikilotherm/asdf-shellspec.git
shfmt                         https://github.com/luizm/asdf-shfmt.git
sinker                        https://github.com/elementalvoid/asdf-sinker.git
skaffold                      https://github.com/nklmilojevic/asdf-skaffold.git
skate                         https://github.com/chessmango/asdf-skate.git
sloth                         https://github.com/slok/asdf-sloth.git
smithy                        https://github.com/aws/asdf-smithy.git
smlnj                         https://github.com/samontea/asdf-smlnj.git
snyk                          https://github.com/nirfuchs/asdf-snyk.git
soft-serve                    https://github.com/chessmango/asdf-soft-serve.git
solidity                      https://github.com/diegodorado/asdf-solidity.git
sops                          https://github.com/feniix/asdf-sops.git
sopstool                      https://github.com/elementalvoid/asdf-sopstool.git
soracom                       https://github.com/grimoh/asdf-soracom.git
sourcery                      https://github.com/younke/asdf-sourcery.git
spacectl                      https://github.com/bodgit/asdf-spacectl.git
spago                         https://github.com/nsaunders/asdf-spago.git
spark                         https://github.com/joshuaballoch/asdf-spark.git
spectral                      https://github.com/vbyrd/asdf-spectral.git
spin                          https://github.com/pavloos/asdf-spin.git
spring-boot                   https://github.com/joschi/asdf-spring-boot.git
spruce                        https://github.com/woneill/asdf-spruce.git
sqldef                        https://github.com/cometkim/asdf-sqldef.git
sqlite                        https://github.com/cLupus/asdf-sqlite.git
sshuttle                      https://github.com/xanmanning/asdf-sshuttle.git
stack                         https://github.com/sestrella/asdf-ghcup.git
starboard                     https://github.com/zufardhiyaulhaq/asdf-starboard.git
starport                      https://github.com/nikever/asdf-starport.git
starship                      https://github.com/grimoh/asdf-starship.git
steampipe                     https://github.com/carnei-ro/asdf-steampipe.git
step                          https://github.com/log2/asdf-step.git
stern                         https://github.com/looztra/asdf-stern.git
stripe-cli                    https://github.com/offbyone/asdf-stripe.git
stylua                        https://github.com/jc00ke/asdf-stylua.git
svu                           https://github.com/asdf-community/asdf-svu
swag                          https://github.com/behoof4mind/asdf-swag.git
swift                         https://github.com/fcrespo82/asdf-swift.git
swiftformat                   https://github.com/younke/asdf-swiftformat.git
swiftgen                      https://github.com/younke/asdf-swiftgen.git
swiftlint                     https://github.com/klundberg/asdf-swiftlint.git
swiprolog                     https://github.com/mracos/asdf-swiprolog.git
syft                          https://github.com/davidgp1701/asdf-syft.git
syncher                       https://github.com/nwillc/syncher.git
talhelper                     https://github.com/bjw-s/asdf-talhelper
talos                         https://github.com/particledecay/asdf-talos.git
talosctl                      https://github.com/bjw-s/asdf-talosctl
tanka                         https://github.com/trotttrotttrott/asdf-tanka.git
task                          https://github.com/particledecay/asdf-task.git
tctl                          https://github.com/eko/asdf-tctl.git
tekton-cli                    https://github.com/johnhamelink/asdf-tekton-cli.git
teleport-community            https://github.com/MaloPolese/asdf-teleport-community
teleport-ent                  https://github.com/highb/asdf-teleport-ent
telepresence                  https://github.com/pirackr/asdf-telepresence.git
teller                        https://github.com/pdemagny/asdf-teller
temporalite                   https://github.com/eko/asdf-temporalite.git
terradozer                    https://github.com/chessmango/asdf-terradozer.git
terraform                     https://github.com/asdf-community/asdf-hashicorp.git
terraform-docs                https://github.com/looztra/asdf-terraform-docs.git
terraform-ls                  https://github.com/asdf-community/asdf-hashicorp.git
terraform-lsp                 https://github.com/bartlomiejdanek/asdf-terraform-lsp.git
terraform-validator           https://github.com/looztra/asdf-terraform-validator.git
terraformer                   https://github.com/grimoh/asdf-terraformer.git
terragrunt                    https://github.com/ohmer/asdf-terragrunt.git
terramate                     https://github.com/martinlindner/asdf-terramate.git
terrascan                     https://github.com/hpdobrica/asdf-terrascan.git
tf-summarize                  https://github.com/adamcrews/asdf-tf-summarize.git
tfc-agent                     https://github.com/asdf-community/asdf-hashicorp.git
tfctl                         https://github.com/deas/asdf-tfctl
tfenv                         https://github.com/carlduevel/asdf-tfenv.git
tflint                        https://github.com/skyzyx/asdf-tflint.git
tfmigrate                     https://github.com/dex4er/asdf-tfmigrate.git
tfnotify                      https://github.com/jnavarrof/asdf-tfnotify.git
tfsec                         https://github.com/woneill/asdf-tfsec.git
tfstate-lookup                https://github.com/carnei-ro/asdf-tfstate-lookup.git
tfswitch                      https://github.com/iul1an/asdf-tfswitch.git
tfupdate                      https://github.com/yuokada/asdf-tfupdate.git
thrift                        https://github.com/alisaifee/asdf-thrift.git
tilt                          https://github.com/eaceaser/asdf-tilt.git
timoni                        https://github.com/Smana/asdf-timoni.git
titan                         https://github.com/gabitchov/asdf-titan.git
tlsg-cli                      https://github.com/0ghny/asdf-tlsgcli.git
tmux                          https://github.com/aphecetche/asdf-tmux.git
tokei                         https://github.com/gasuketsu/asdf-tokei.git
tomcat                        https://github.com/mbutov/asdf-tomcat
tonnage                       https://github.com/elementalvoid/asdf-tonnage.git
tool-versions-to-env          https://github.com/smartcontractkit/tool-versions-to-env-action.git
trdsql                        https://github.com/johnlayton/asdf-trdsql.git
tree-sitter                   https://github.com/ivanvc/asdf-tree-sitter.git
tridentctl                    https://github.com/asdf-community/asdf-tridentctl.git
trivy                         https://github.com/zufardhiyaulhaq/asdf-trivy.git
tsuru                         https://github.com/virtualstaticvoid/asdf-tsuru.git
ttyd                          https://github.com/ivanvc/asdf-ttyd.git
tuist                         https://github.com/cprecioso/asdf-tuist.git
tx                            https://github.com/ORCID/asdf-transifex.git
typos                         https://github.com/aschiavon91/asdf-typos.git
uaa-cli                       https://github.com/vmware-tanzu/tanzu-plug-in-for-asdf.git
unison                        https://github.com/susurri/asdf-unison.git
upt                           https://github.com/ORCID/asdf-upt.git
upx                           https://github.com/jimmidyson/asdf-upx.git
usql                          https://github.com/itspngu/asdf-usql.git
v                             https://github.com/jthegedus/asdf-v.git
vale                          https://github.com/pdemagny/asdf-vale
vals                          https://github.com/dex4er/asdf-vals.git
vault                         https://github.com/asdf-community/asdf-hashicorp.git
vcluster                      https://gitlab.com/wt0f/asdf-vcluster.git
vela                          https://github.com/pdemagny/asdf-vela
velad                         https://github.com/pdemagny/asdf-velad
velero                        https://github.com/looztra/asdf-velero.git
vendir                        https://github.com/vmware-tanzu/asdf-carvel.git
venom                         https://github.com/aabouzaid/asdf-venom.git
vhs                           https://github.com/chessmango/asdf-vhs.git
viddy                         https://github.com/ryodocx/asdf-viddy.git
vim                           https://github.com/tsuyoshicho/asdf-vim.git
vultr-cli                     https://github.com/ikuradon/asdf-vultr-cli.git
wasi-sdk                      https://github.com/coolreader18/asdf-wasi-sdk.git
wasm3                         https://github.com/tachyonicbytes/asdf-wasm3
wasm4                         https://github.com/jtakakura/asdf-wasm4
wasmer                        https://github.com/tachyonicbytes/asdf-wasmer
wasmtime                      https://github.com/tachyonicbytes/asdf-wasmtime
watchexec                     https://github.com/nyrst/asdf-watchexec.git
waypoint                      https://github.com/asdf-community/asdf-hashicorp.git
weave-gitops                  https://github.com/deas/asdf-weave-gitops
websocat                      https://github.com/bdellegrazie/asdf-websocat.git
wren-cli                      https://github.com/jtakakura/asdf-wren-cli.git
wrk                           https://github.com/ivanvc/asdf-wrk.git
wtfutil                       https://github.com/NeoHsu/asdf-wtfutil.git
xc                            https://github.com/airtonix/asdf-xc
xchtmlreport                  https://github.com/younke/asdf-xchtmlreport.git
xcodegen                      https://github.com/younke/asdf-xcodegen.git
xcodes                        https://github.com/younke/asdf-xcodes.git
xh                            https://github.com/NeoHsu/asdf-xh
yadm                          https://github.com/particledecay/asdf-yadm.git
yamlfmt                       https://github.com/kachick/asdf-yamlfmt.git
yamllint                      https://github.com/ericcornelissen/asdf-yamllint.git
yarn                          https://github.com/twuni/asdf-yarn.git
yay                           https://github.com/aaaaninja/asdf-yay.git
yj                            https://github.com/ryodocx/asdf-yj.git
yor                           https://github.com/ordinaryexperts/asdf-yor
youtube-dl                    https://github.com/iul1an/asdf-youtube-dl
yq                            https://github.com/sudermanjr/asdf-yq.git
ytt                           https://github.com/vmware-tanzu/asdf-carvel.git
zbctl                         https://github.com/camunda-community-hub/asdf-zbctl.git
zellij                        https://github.com/chessmango/asdf-zellij.git
zephyr                        https://github.com/nsaunders/asdf-zephyr.git
zig                           https://github.com/cheetah/asdf-zig.git
zigmod                        https://github.com/kachick/asdf-zigmod.git
zola                          https://github.com/salasrod/asdf-zola.git
zoxide                        https://github.com/nyrst/asdf-zoxide
zprint                        https://github.com/carlduevel/asdf-zprint.git
$ asdf plugin add python
$ asdf list all python
2.1.3
2.2.3
2.3.7
2.4.0
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.4.6
2.5.0
2.5.1
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.6.0
2.6.1
2.6.2
2.6.3
2.6.4
2.6.5
2.6.6
2.6.7
2.6.8
2.6.9
2.7.0
2.7-dev
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.7.6
2.7.7
2.7.8
2.7.9
2.7.10
2.7.11
2.7.12
2.7.13
2.7.14
2.7.15
2.7.16
2.7.17
2.7.18
3.0.1
3.1.0
3.1.1
3.1.2
3.1.3
3.1.4
3.1.5
3.2.0
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5
3.2.6
3.3.0
3.3.1
3.3.2
3.3.3
3.3.4
3.3.5
3.3.6
3.3.7
3.4.0
3.4-dev
3.4.1
3.4.2
3.4.3
3.4.4
3.4.5
3.4.6
3.4.7
3.4.8
3.4.9
3.4.10
3.5.0
3.5-dev
3.5.1
3.5.2
3.5.3
3.5.4
3.5.5
3.5.6
3.5.7
3.5.8
3.5.9
3.5.10
3.6.0
3.6-dev
3.6.1
3.6.2
3.6.3
3.6.4
3.6.5
3.6.6
3.6.7
3.6.8
3.6.9
3.6.10
3.6.11
3.6.12
3.6.13
3.6.14
3.6.15
3.7.0
3.7-dev
3.7.1
3.7.2
3.7.3
3.7.4
3.7.5
3.7.6
3.7.7
3.7.8
3.7.9
3.7.10
3.7.11
3.7.12
3.7.13
3.7.14
3.7.15
3.7.16
3.7.17
3.8.0
3.8-dev
3.8.1
3.8.2
3.8.3
3.8.4
3.8.5
3.8.6
3.8.7
3.8.8
3.8.9
3.8.10
3.8.11
3.8.12
3.8.13
3.8.14
3.8.15
3.8.16
3.8.17
3.9.0
3.9-dev
3.9.1
3.9.2
3.9.4
3.9.5
3.9.6
3.9.7
3.9.8
3.9.9
3.9.10
3.9.11
3.9.12
3.9.13
3.9.14
3.9.15
3.9.16
3.9.17
3.10.0
3.10-dev
3.10.1
3.10.2
3.10.3
3.10.4
3.10.5
3.10.6
3.10.7
3.10.8
3.10.9
3.10.10
3.10.11
3.10.12
3.11.0
3.11-dev
3.11.1
3.11.2
3.11.3
3.11.4
3.12.0b4
3.12-dev
3.13-dev
....    ....
....    ....
....    ....
....    ....
....    ....
....    ....
....    ....
....    ....

Pythonの依存バッケージをインストールする。

$ sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
% brew install openssl readline sqlite3 xz zlib tcl-tk

使用する予定のバージョンをインストールする。

$ asdf install python 3.8.17
$ asdf install python 3.9.17
$ asdf install python 3.10.12
$ asdf install python 3.11.4
$ asdf list python
  3.10.12
  3.11.4
  3.8.17
  3.9.17

Pythonバージョンの設定

グローバルなバージョンを設定

$ asdf global python 3.8.17
$ cd
$ python --version
Python 3.8.17

プロジェクトのローカルバージョンを設定

$ cd PROJECT_DIR
$ asdf local python 3.8.17
$ python --version
Python 3.8.17

asdf + PoetryによるPython仮想環境構築

$ mkdir PROJECT_DIR
$ cd PROJECT_DIR
$ asdf local python 3.10.12
$ poetry init
Configuration file exists at /Users/LOGINUSER/Library/Preferences/pypoetry, reusing this directory.

Consider moving TOML configuration files to /Users/LOGINUSER/Library/Application Support/pypoetry, as support for the legacy directory will be removed in an upcoming release.

This command will guide you through creating your pyproject.toml config.

Package name [project_dir]:
Version [0.1.0]:
Description []:
Author [vedfolnir-k9 <vedfolnir@ketus-ix.work>, n to skip]:
License []:
Compatible Python versions [^3.11]:  >=3.8,<3.11

Would you like to define your main dependencies interactively? (yes/no) [yes] no
Would you like to define your development dependencies interactively? (yes/no) [yes] no
Generated file

[tool.poetry]
name = "project-dir"
version = "0.1.0"
description = ""
authors = ["vedfolnir-k9 <vedfolnir@ketus-ix.work>"]
readme = "README.md"
packages = [{include = "project_dir"}]

[tool.poetry.dependencies]
python = ">=3.8,<3.11"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


Do you confirm generation? (yes/no) [yes]
$ poetry install
Configuration file exists at /Users/LOGINUSER/Library/Preferences/pypoetry, reusing this directory.

Consider moving TOML configuration files to /Users/LOGINUSER/Library/Application Support/pypoetry, as support for the legacy directory will be removed in an upcoming release.
The currently activated Python version 3.11.4 is not supported by the project (>=3.8,<3.11).
Trying to find and use a compatible version.
Using python3 (3.10.12)
Creating virtualenv project-dir2 in /Users/LOGINUSER/PROJECT_DIR/.venv
Updating dependencies
Resolving dependencies... (0.1s)

Writing lock file
/Users/LOGINUSER/PROJECT_DIR/project_dir does not contain any element

【補足情報】anyenvのアンイストール

anyenvを無効にする

Ubuntu

$ vi ~/.bashrc
-export PATH="$HOME/.anyenv/bin:$PATH"
-eval "$(anyenv init -)"
$ source ~/.bashrc
$ vi ~/.zshrc
-export PATH="$HOME/.anyenv/bin:$PATH"
-eval "$(anyenv init -)"
$ source ~/.zshrc

Mac

$ vi ~/.bashrc
-eval "$(anyenv init -)"
$ source ~/.bashrc
% vi ~/.zshrc
-eval "$(anyenv init -)"
% source ~/.zshrc

anyenvをアンイストールする

$ rm -rf ~/.anyenv
% brew uninstall anyenv
% rm -rf ~/.anyenv

【Python】anyenv + pyenv + Poetryによる仮想環境構築

日常的にPythonでプログラミングしているが、開発対象のプログラムやプロジェクトによって使用するPythonのバージョンを変えなればならないケースが多いので、ほとんどの人がそうしているだろうが、私もPythonでの開発は仮想環境でしかやらない。

Pythonの仮想環境ツールとして、最初の頃はpipenvを利用していたがいまはPoetryを利用している。また、複数の言語を使ってプログラミングするので、言語バージョン管理ツールとしてanyenvとpyenvも併用している。

python-poetry.org

github.com

github.com

自分の備忘録を兼ねて、anyenv + pyenv + Poetryを利用してPython仮想環境を構築する手順を要点だけに絞って本記事に書いておく。いずれのツールもリファレンス的記事はたくさん存在するので、各ツールの詳しい使い方はそれらの記事に譲る。

anyenvのインストール

$ git clone https://github.com/anyenv/anyenv ~/.anyenv
% brew install anyenv

anyenvのコマンドパスを設定

Ubuntu

$ echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(anyenv init -)"' >> ~/.bashrc
% echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.zshrc
% echo 'eval "$(anyenv init -)"' >> ~/.zshrc

Mac

$ echo 'eval "$(anyenv init -)"' >> ~/.bashrc
% echo 'eval "$(anyenv init -)"' >> ~/.zshrc

anyenvの初期化とプラグインの追加

$ exec $SHELL -l
$ anyenv --version
$ anyenv install --init
Manifest directory doesn't exist: /home/LOGINUSER/.config/anyenv/anyenv-install
Do you want to checkout https://github.com/anyenv/anyenv-install.git? [y/N]: y
Cloning https://github.com/anyenv/anyenv-install.git master to /home/LOGINUSER/.config/anyenv/anyenv-install...
Cloning into '/home/LOGINUSER/.config/anyenv/anyenv-install'...
....    ....
....    ....

Completed!
$ mkdir -p $(anyenv root)/plugins
$ git clone https://github.com/znz/anyenv-update.git $(anyenv root)/plugins/anyenv-update
$ git clone https://github.com/znz/anyenv-git.git $(anyenv root)/plugins/anyenv-git
$ anyenv commands
commands
completions
envs
git
global
help
init
install
local
root
uninstall
update
--version
version
versions

anyenvによるpyenvのインストール

$ anyenv install --list
  Renv
  crenv
  denv
  erlenv
  exenv
  goenv
  hsenv
  jenv
  jlenv
  kubectlenv
  luaenv
  nodenv
  phpenv
  plenv
  pyenv
  rbenv
  sbtenv
  scalaenv
  swiftenv
  tfenv
$ anyenv install pyenv
$ exec $SHELL -l
$ pyenv --version

pyenvによるPythonのインストール

% pyenv install --list
Available versions:
  2.1.3
  2.2.3
  2.3.7
  2.4.0
  2.4.1
  2.4.2
  2.4.3
  2.4.4
  2.4.5
  2.4.6
  2.5.0
  2.5.1
  2.5.2
  2.5.3
  2.5.4
  2.5.5
  2.5.6
  2.6.0
  2.6.1
  2.6.2
  2.6.3
  2.6.4
  2.6.5
  2.6.6
  2.6.7
  2.6.8
  2.6.9
  2.7.0
  2.7-dev
  2.7.1
  2.7.2
  2.7.3
  2.7.4
  2.7.5
  2.7.6
  2.7.7
  2.7.8
  2.7.9
  2.7.10
  2.7.11
  2.7.12
  2.7.13
  2.7.14
  2.7.15
  2.7.16
  2.7.17
  2.7.18
  3.0.1
  3.1.0
  3.1.1
  3.1.2
  3.1.3
  3.1.4
  3.1.5
  3.2.0
  3.2.1
  3.2.2
  3.2.3
  3.2.4
  3.2.5
  3.2.6
  3.3.0
  3.3.1
  3.3.2
  3.3.3
  3.3.4
  3.3.5
  3.3.6
  3.3.7
  3.4.0
  3.4-dev
  3.4.1
  3.4.2
  3.4.3
  3.4.4
  3.4.5
  3.4.6
  3.4.7
  3.4.8
  3.4.9
  3.4.10
  3.5.0
  3.5-dev
  3.5.1
  3.5.2
  3.5.3
  3.5.4
  3.5.5
  3.5.6
  3.5.7
  3.5.8
  3.5.9
  3.5.10
  3.6.0
  3.6-dev
  3.6.1
  3.6.2
  3.6.3
  3.6.4
  3.6.5
  3.6.6
  3.6.7
  3.6.8
  3.6.9
  3.6.10
  3.6.11
  3.6.12
  3.6.13
  3.6.14
  3.6.15
  3.7.0
  3.7-dev
  3.7.1
  3.7.2
  3.7.3
  3.7.4
  3.7.5
  3.7.6
  3.7.7
  3.7.8
  3.7.9
  3.7.10
  3.7.11
  3.7.12
  3.7.13
  3.7.14
  3.7.15
  3.7.16
  3.7.17
  3.8.0
  3.8-dev
  3.8.1
  3.8.2
  3.8.3
  3.8.4
  3.8.5
  3.8.6
  3.8.7
  3.8.8
  3.8.9
  3.8.10
  3.8.11
  3.8.12
  3.8.13
  3.8.14
  3.8.15
  3.8.16
  3.8.17
  3.9.0
  3.9-dev
  3.9.1
  3.9.2
  3.9.4
  3.9.5
  3.9.6
  3.9.7
  3.9.8
  3.9.9
  3.9.10
  3.9.11
  3.9.12
  3.9.13
  3.9.14
  3.9.15
  3.9.16
  3.9.17
  3.10.0
  3.10-dev
  3.10.1
  3.10.2
  3.10.3
  3.10.4
  3.10.5
  3.10.6
  3.10.7
  3.10.8
  3.10.9
  3.10.10
  3.10.11
  3.10.12
  3.11.0
  3.11-dev
  3.11.1
  3.11.2
  3.11.3
  3.11.4
  3.12.0b4
  3.12-dev
  3.13-dev
  ....    ....
  ....    ....
  ....    ....
  ....    ....
  ....    ....
  ....    ....
  ....    ....
  ....    ....

使用する予定のバージョンをインストールしておく。

$ pyenv install 3.8.17
$ pyenv install 3.9.17
$ pyenv install 3.10.12
$ pyenv install 3.11.4
$ pyenv versions
* system (set by /home/LOGINUSER/.anyenv/envs/pyenv/version)
  3.8.17
  3.9.17
  3.10.12
  3.11.4

pyenvによるPythonインストール時の補足情報

Ubuntuで、anyenvによってPythonをインストールするときに、以下のようなエラーが表示されることがある。

$ pyenv install 3.8.17
....    ....
....    ....
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/LOGINUSER/.anyenv/envs/pyenv/versions/3.8.17/lib/python3.8/bz2.py", line 19, in <module>
    from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'readline'
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/LOGINUSER/.anyenv/envs/pyenv/versions/3.8.17/lib/python3.8/ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ModuleNotFoundError: No module named '_ssl'
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
....    ....
....    ....

その場合は、以下のコマンドを実行すれば解決できる。

$ sudo apt install -y libbz2-dev libreadline-dev libssl-dev
$ pyenv install 3.8.17

Ubuntuで、anyenvによってPythonをインストールするときに、以下のような警告が表示されることがある。

$ pyenv install 3.8.17
....    ....
....    ....
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/LOGINUSER/.anyenv/envs/pyenv/versions/3.8.17/lib/python3.8/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/home/LOGINUSER/anyenv/envs/pyenv/versions/3.8.17/lib/python3.8/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?
Installed Python-3.8.17 to /home/LOGINUSER/.anyenv/envs/pyenv/versions/3.8.17

その場合は、以下のコマンドを実行すれば解決できる。

$ pyenv uninstall 3.8.17
$ sudo apt install -y libsqlite3-dev
$ pyenv install 3.8.17

UbuntuまたはMacで、anyenvによってPythonをインストールするときに、以下のような警告が表示されることがある。

$ pyenv install 3.8.17
....    ....
....    ....
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/LOGINUSER/.anyenv/envs/pyenv/versions/3.8.17/lib/python3.8/tkinter/__init__.py", line 36, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'
WARNING: The Python tkinter extension was not compiled and GUI subsystem has been detected. Missing the Tk toolkit?
Installed Python-3.8.17 to /home/LOGINUSER/.ayenv/envs/pyenv/versions/3.8.17

その場合は、以下のコマンドを実行すれば解決できる。

$ pyenv uninstall 3.8.17
$ sudo apt install -y python3-tk tk-dev
$ pyenv install 3.8.17
% pyenv uninstall 3.8.17
% brew install python-tk
% pyenv install 3.8.17

UbuntuまたはMacで、anyenvによってPythonをインストールするときに、以下のような警告が表示されることがある。

% pyenv install 3.8.17
....    ....
....    ....
python-build: use zlib from xcode sdk
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/LOGINUSER/.anyenv/envs/pyenv/versions/3.8.17/lib/python3.8/lzma.py", line 27, in <module>
    from _lzma import *
ModuleNotFoundError: No module named '_lzma'
WARNING: The Python lzma extension was not compiled. Missing the lzma lib?
Installed Python-3.8.17 to /home/LOGINUSER/.anyenv/envs/pyenv/versions/3.8.17

その場合は、以下のコマンドを実行すれば解決できる。

$ pyenv uninstall 3.8.17
$ sudo apt install -y liblzma-dev
$ pyenv install 3.8.17
% pyenv uninstall 3.8.17
% brew install xz
% pyenv install 3.8.17

Pythonバージョンの設定

グローバルなバージョンを設定

$ pyenv global 3.8.17
$ cd
$ python --version
Python 3.8.17

プロジェクトのローカルバージョンを設定

$ cd PROJECT_DIR
$ pyenv local 3.8.17
$ python --version
Python 3.8.17

Poetryのインストール

$ curl -sSL https://install.python-poetry.org | python3 -
$ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
$ source ~/.bashrc
$ poetry --version
% brew install poetry
% poetry --version

プロジェクトディレクトリ内に仮想環境を構築するように設定

$ poetry config virtualenvs.in-project true
$ poetry config --list
....    ....
virtualenvs.in-project = true
....    ....

pyenv + PoetryによるPython仮想環境構築

$ mkdir PROJECT_DIR
$ cd PROJECT_DIR
$ pyenv local 3.10.12
$ poetry init
Configuration file exists at /Users/LOGINUSER/Library/Preferences/pypoetry, reusing this directory.

Consider moving TOML configuration files to /Users/LOGINUSER/Library/Application Support/pypoetry, as support for the legacy directory will be removed in an upcoming release.

This command will guide you through creating your pyproject.toml config.

Package name [project_dir]:
Version [0.1.0]:
Description []:
Author [vedfolnir-k9 <vedfolnir@ketus-ix.work>, n to skip]:
License []:
Compatible Python versions [^3.11]:  >=3.8,<3.11

Would you like to define your main dependencies interactively? (yes/no) [yes] no
Would you like to define your development dependencies interactively? (yes/no) [yes] no
Generated file

[tool.poetry]
name = "project-dir"
version = "0.1.0"
description = ""
authors = ["vedfolnir-k9 <vedfolnir@ketus-ix.work>"]
readme = "README.md"
packages = [{include = "project_dir"}]

[tool.poetry.dependencies]
python = ">=3.8,<3.11"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


Do you confirm generation? (yes/no) [yes]
$ poetry install
Configuration file exists at /Users/LOGINUSER/Library/Preferences/pypoetry, reusing this directory.

Consider moving TOML configuration files to /Users/LOGINUSER/Library/Application Support/pypoetry, as support for the legacy directory will be removed in an upcoming release.
The currently activated Python version 3.11.4 is not supported by the project (>=3.8,<3.11).
Trying to find and use a compatible version.
Using python3 (3.10.12)
Creating virtualenv project-dir2 in /Users/LOGINUSER/PROJECT_DIR/.venv
Updating dependencies
Resolving dependencies... (0.1s)

Writing lock file
/Users/LOGINUSER/PROJECT_DIR/project_dir does not contain any element

プロンプトCompatible Python versions [^3.11]:に対する入力は、以下のような意味になる。

  • ^3.11

3.11 ≦ プログラムのPython依存バージョン < 4.0

  • >=3.8,<3.11

3.8 ≦ プログラムのPython依存バージョン ≦ 3.10

PoetryでのPythonパッケージの追加/削除

依存パッケージの追加

$ poerty add PACKAGE

依存パッケージの削除

$ poerty remove PACKAGE

開発用依存パッケージの追加

$ poerty add PACKAGE --dev

開発用依存パッケージの削除

$ poerty remove PACKAGE --dev

poetryによるPythonプログラムの実行

仮想環境を起動しないでPythonプログラムを実行

$ poetry run PROGRAM.py

仮想環境を起動してPythonプログラムを実行

$ poetry shell
$ python PROGRAM.py

補足情報

requirements.txtが存在する既存のPythonプログラムを利用する場合、Poetryによるプロジェクトディレクトリの作成・初期化後に以下のコマンドを実行するとすべての依存パッケージをインストールできる。

$ cat requirements.txt | xargs poetry add

【追記】〔2023-08-19〕

上には、pyenvによるPythonのインストール時に遭遇するエラーや警告の対処方法について個別に書いたが、これを一括で回避する方法がpyenvのサイトに掲載されていた。

コマンドpyenv install PYTHON_VERSIONを実行する前に、以下のコマンドによってPythonの依存バッケージをインストールしておけば良い。

$ sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
% brew install openssl readline sqlite3 xz zlib tcl-tk

【参照リンク】

github.com

DockerクラウドサービスPortainerを使い始めた

ググっているうちにたまたま見つけたのだが、Portainerというクラウドサービスが素晴らしかったので紹介したい。

PortainerはDockerコンテナをクラウド上で稼働運用できるサービスだ。

www.portainer.io

私もサーバーを使う開発ではDockerを利用することが多いが、実際ところ、ローカルPC上でDockerを使うのは結構面倒だったりする。いくつもコンテナを作るとディスク容量が圧迫されるし、コンテナを起動したまま停止し忘れると、PCのバッテリーの持ちが悪くなる。コンテナだけでなくDockerデーモンも停止しておかないと、 同様にバッテリーの減りが加速してしまう(Docker導入済みのPCでなんだか動作が遅いなぁとかバッテリーの減りが速いなぁと感じたら、最初にDockerを疑った方が良い)。

GCPやAzureなどのクラウドコンピューティングVPSサービスなどを利用してDockerサーバーを設置するという手もあるが、OSの導入から始めないといけないのが面倒だ。それに、これらの利用料はそこそこ高いし。Dockerコンテナをそのままクラウド上で稼働できる低額のサービスがあれば良いのにと思っていたが、Portainerがまさにそれだった。

ちなみに、PortainerにはPortainer-CE(Community Edition)というフリー版が存在する。これはローカルPC上でDockerコンテナを運用できるものだ。機能的には公式のDocker Desktopと同様のものだが、これよりずっと使いやすくてブラウザから操作できるのが良い。Docker Desktopを一定規模以上の企業で利用する場合有料サブスクリプションが必要になるが、Portainer-CEは無償で使い続けることができる。

以降では、このPortainer-CEのインストール方法と使い方を説明していく。

Portainerのインストール

最初に、Portainer用のデータ・ディレクトリを作成しておく。このディレクトリには、Portainerのログイン情報やコンテナのデータベース情報などが格納される。

% mkdir portainer_data

Portainer-CEをインストールするには、下のコマンドを実行すれば良い。

% docker run -d -p 8000:8000 -p 9000:9000 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

このコマンドは、Docker Hub上に存在するportainer-ceというコンテナを取得してDockerコンテナを生成・起動している。

hub.docker.com

なお、上記のコマンドを実行したときに、下のようなエラーが表示されることがある。

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.

これはDockerデーモンが起動していないという意味なので、その場合は、Docker Desktopを起動した上で再度上記のコマンドを実行すれば良い。

Portainerコンテナの起動後、ブラウザからhttp://localhost:9000にアクセスすると、下のような画面が表示される。

[Username]と[Password]に適当な値を入力すると(Portainer-CEはローカル稼働なので、これらはどんな値でも問題ない)、下のような画面になる。

ここで[Get Started]を選択すると、Portainerの管理画面が表示される。

この画面で、Portainer自身がコンテナとして起動していることが判る。

Portainerの使い方

コンテナの作成は、上の画面の[ + Add container ]ボタンからできる。ただし、dockerコマンドに慣れているなら、そちらを使った方が楽だろう。例えば、下のようにコマンドを実行すれば、nginxによるWebサーバーのコンテナを作成できる。

% docker run -d -it -p 8080:80 --name nginx nginx

新しいコンテナが作成されると、Portainerの管理画面に反映される。

この画面から [nginx] > [Console] と辿って、[Connect] を押すと、起動中のコンテナのコンソール画面に入れる。

Portainerには、下のようなApp Templatesという名前のコンテナ・テンプレートが在って、これらを利用してコンテナを作成することもできる。

上で紹介したのはローカルPC上でコンテナを運用するPortainer-CEだが、同じ使い勝手でPortainerのクラウド上にコンテナを作成運用できるPortainer-BE(Business Edition)もある。このサービスの最低プランなら$149/年で15個のコンテナを作成できる(本記事執筆時点のプラン内容)。メジャーなクラウドコンピューティングVPSサービスと比べると、この価格は安いと思う。

Dockerを多用してバックエンド開発をするエンジニアにとって、Portainerは福音とも言えるクラウドコンピューティング・サービスではないだろうか。

【参照サイト】

qiita.com

stella_vslamのUbuntu 22.04でのビルド

前記事にstella_vslamのUbuntu 20.04でのビルド手順を書いたが、Ubutu 22.04でのビルドもやってみた。

Ubuntu 20.04の場合との相違点は一点だけなので、それを以下に書いておく。

stella_vslamのビルド依存パッケージの導入

OpenCVの依存パッケージ

$ sudo apt install -y libgtk-3-dev ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libtbb-dev

libavresample-devを削除した。このパッケージはUbuntu 22.04では利用できなくなっている。

stella_vslamとリンクされるライブラリのビルドとインストール

OpenCV

$ cd Depended_Builds
$ wget -q https://github.com/opencv/opencv/archive/4.8.0.zip
$ unzip -q 4.8.0.zip
# Download aruco module (optional)
$ wget -q https://github.com/opencv/opencv_contrib/archive/refs/tags/4.8.0.zip -O opencv_contrib-4.8.0.zip
$ unzip -q opencv_contrib-4.8.0.zip
$ mkdir opencv_extra && cd opencv_extra
$ ln -s ../opencv_contrib-4.8.0/modules/aruco .
$ cd ../opencv-4.8.0
$ mkdir build && cd build
$ cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr/local \
    -DBUILD_DOCS=OFF \
    -DBUILD_EXAMPLES=OFF \
    -DBUILD_JASPER=OFF \
    -DBUILD_OPENEXR=OFF \
    -DBUILD_PERF_TESTS=OFF \
    -DBUILD_TESTS=OFF \
    -DBUILD_PROTOBUF=OFF \
    -DBUILD_opencv_apps=OFF \
    -DBUILD_opencv_dnn=OFF \
    -DBUILD_opencv_ml=OFF \
    -DBUILD_opencv_python_bindings_generator=OFF \
    -DENABLE_CXX11=ON \
    -DENABLE_FAST_MATH=ON \
    -DWITH_EIGEN=ON \
    -DWITH_FFMPEG=ON \
    -DWITH_TBB=ON \
    -DWITH_OPENMP=ON \
    -DOPENCV_EXTRA_MODULES_PATH=../../opencv_extra \
    ..
$ make -j4
$ sudo make install
$ sudo ldconfig

本記事執筆時点で最新バージョンのOpenCV 4.8.0で試してみた。こちらでもstella_vslamは問題なく動くことが確認できた。

なお、NVIDIA GPU搭載PCでCUDAが導入済みの場合、CUDA利用を有効にしてOpenCVをビルドすると、stella_vslamの実行速度が速くなる。以下にその方法を紹介しておく。

CUDA有効OpenCVのビルド(stella_vslam用)

gccのバージョンを確認して、バージョン10より大きければ、 gcc 10をインストールする。

$ gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ sudo apt install -y gcc-10 g++-10

OpenCVのcmakeオプションを下のように変える。

$ mkdir build2 && cd build2
$ cmake \
    -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \
    -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr/local \
    -DBUILD_DOCS=OFF \
    -DBUILD_EXAMPLES=OFF \
    -DBUILD_JASPER=OFF \
    -DBUILD_OPENEXR=OFF \
    -DBUILD_PERF_TESTS=OFF \
    -DBUILD_TESTS=OFF \
    -DBUILD_PROTOBUF=OFF \
    -DBUILD_opencv_apps=OFF \
    -DBUILD_opencv_dnn=OFF \
    -DBUILD_opencv_ml=OFF \
    -DBUILD_opencv_python_bindings_generator=OFF \
    -DENABLE_CXX11=ON \
    -DENABLE_FAST_MATH=ON \
    -DWITH_EIGEN=ON \
    -DWITH_FFMPEG=ON \
    -DWITH_TBB=ON \
    -DWITH_OPENMP=ON \
    -DWITH_CUDA=ON \
    -DWITH_NVCUID=ON \
    -DWITH_CUBLAS=ON \
    -DWITH_OPENCL=OFF \
    -DWITH_OPENGL=ON \
    -DCUDA_ARCH_BIN="8.6" \
    -DCUDA_ARCH_PTX="" \
    -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.8.0/modules \
    ..
$ make -j4

オプションCUDA_ARCH_BINに指定する数値はGPUアーキテクチャ番号だが、これは下のサイトを参照して決める。

developer.nvidia.com

上記はあくまでOpenCV 4.8.0をUbuntu 22.04上でビルドする場合なので、他では違ってくるかもしれない。

【追記】〔2023-08-21〕

OpenCVのCUDA利用を有効にする場合、g2oも以下のように変更してビルドすることを薦める。

$ mkdir build2 && cd build2
$ cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr/local \
    -DBUILD_SHARED_LIBS=ON \
    -DBUILD_UNITTESTS=OFF \
    -DG2O_USE_CHOLMOD=OFF \
    -DG2O_USE_CSPARSE=ON \
    -DG2O_USE_OPENGL=ON \
    -DG2O_USE_OPENMP=ON \
    -DG2O_BUILD_APPS=OFF \
    -DG2O_BUILD_EXAMPLES=OFF \
    -DG2O_BUILD_LINKED_APPS=OFF \
    ..
$ make -j4