pipxを使ったAnsibleのインストール
pipxを使ったAnsibleのインストールについて (PATHに既に~/.local/binがあったら以下のように出る)
$ python3 -m pip install --user pipx
code:memo
Collecting pipx
Downloading pipx-1.2.1-py3-none-any.whl.metadata (13 kB)
Collecting argcomplete>=1.9.4 (from pipx)
Downloading argcomplete-3.1.4-py3-none-any.whl.metadata (16 kB)
Collecting packaging>=20.0 (from pipx)
Downloading packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
Collecting userpath>=1.6.0 (from pipx)
Downloading userpath-1.9.1-py3-none-any.whl.metadata (3.0 kB)
Collecting click (from userpath>=1.6.0->pipx)
Downloading click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Downloading pipx-1.2.1-py3-none-any.whl (57 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.8/57.8 kB 2.2 MB/s eta 0:00:00
Downloading argcomplete-3.1.4-py3-none-any.whl (41 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.6/41.6 kB 2.7 MB/s eta 0:00:00
Downloading packaging-23.2-py3-none-any.whl (53 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.0/53.0 kB 3.6 MB/s eta 0:00:00
Downloading userpath-1.9.1-py3-none-any.whl (9.1 kB)
Downloading click-8.1.7-py3-none-any.whl (97 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 5.6 MB/s eta 0:00:00
DEPRECATION: distro-info 1.1build1 has a non-standard version number. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of distro-info or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063 Installing collected packages: packaging, click, argcomplete, userpath, pipx
WARNING: The script userpath is installed in '/home/pogin503/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script pipx is installed in '/home/pogin503/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
$ python3 -m pipx ensurepath
code:memo
/home/pogin503/.local/bin is already in PATH.
⚠️ All pipx binary directories have been added to PATH. If you are sure you want to proceed, try again with the
'--force' flag.
Otherwise pipx is ready to go! ✨ 🌟 ✨
pogin503@DESKTOP-66Q50RC ~/d/etc (master)> pipx install --include-deps ansible
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt install python3.10-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Failing command: /home/pogin503/.local/pipx/shared/bin/python3
'/usr/bin/python3 -m venv --clear /home/pogin503/.local/pipx/shared' failed
$ sudo apt install python3.10-venv
code:memo
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
python3-pip-whl python3-setuptools-whl
The following NEW packages will be installed:
python3-pip-whl python3-setuptools-whl python3.10-venv
0 upgraded, 3 newly installed, 0 to remove and 136 not upgraded.
Need to get 2473 kB of archives.
After this operation, 2882 kB of additional disk space will be used.
Do you want to continue? Y/n y Fetched 2473 kB in 2s (1056 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "ja_JP.utf8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package python3-pip-whl.
(Reading database ... 65544 files and directories currently installed.)
Preparing to unpack .../python3-pip-whl_22.0.2+dfsg-1ubuntu0.3_all.deb ...
Unpacking python3-pip-whl (22.0.2+dfsg-1ubuntu0.3) ...
Selecting previously unselected package python3-setuptools-whl.
Preparing to unpack .../python3-setuptools-whl_59.6.0-1.2ubuntu0.22.04.1_all.deb ...
Unpacking python3-setuptools-whl (59.6.0-1.2ubuntu0.22.04.1) ...
Selecting previously unselected package python3.10-venv.
Preparing to unpack .../python3.10-venv_3.10.12-1~22.04.2_amd64.deb ...
Unpacking python3.10-venv (3.10.12-1~22.04.2) ...
Setting up python3-setuptools-whl (59.6.0-1.2ubuntu0.22.04.1) ...
Setting up python3-pip-whl (22.0.2+dfsg-1ubuntu0.3) ...
Setting up python3.10-venv (3.10.12-1~22.04.2) ...
$ pipx install --include-deps ansible
code:memo
installed package ansible 8.6.0, installed using Python 3.10.12
These apps are now globally available
- ansible
- ansible-community
- ansible-config
- ansible-connection
- ansible-console
- ansible-doc
- ansible-galaxy
- ansible-inventory
- ansible-playbook
- ansible-pull
- ansible-test
- ansible-vault
done! ✨ 🌟 ✨