UJP - 技術情報1

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

csvkitを使う

csvkit を使う



  1. csvkit を使う
      1. 更新履歴
      2. はじめに
      3. インストール作業
        1. brewでパッケージを確認.
        2. パッケージをインストールする.
        3. python3のバージョンを確認.
        4. xcodeのコマンドラインツールをインストールす る.
      4. python3.11をインストール
        1. python3へのリンクを張り替える
        2. 再度csvkitのインストールを実行
      5. チュートリアルをやってみる
        1. in2csvコマンド
        2. csvcutコマンド

更新履歴

  • 2023.02.08

はじめに

 このドキュメントはコマンドラインでCSVファイルを扱うためのツールキットであり,csvkitをインストールし,使ってみた記録である.
 利用している環境は,macOS Monterey 12.6.2.環境としてはHome Brewの初期設定が終わっている必要があ理,今回はXcodeのコマンドラインツール,Python3.9をPython3.11へアップグレードを行 なってバージョンを切り替え,チュートリアルをやってみるところまで記載する.

インストール作業

brewでパッケージを確認.


$ brew info csvkit🆑
==> csvkit: stable 1.1.0 (bottled)
Suite of command-line tools for converting to and working with CSV
https://csvkit.readthedocs.io/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/csvkit.rb
License: MIT
==> Dependencies
Required: python@3.11 ✘, six ✘
==> Analytics
install: 3,445 (30 days), 4,712 (90 days), 15,126 (365 days)
install-on-request: 3,445 (30 days), 4,711 (90 days), 15,123 (365 days)
build-error: 0 (30 days)
$

  • python3.11が必要.

パッケージをインストールする.


$ brew install csvkit🆑
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
clang-build-analyzer                                                    xcdiff
==> New Casks
rive
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun

You have 61 outdated formulae and 1 outdated cask installed.
You can upgrade them with brew upgrade
or list them with brew outdated.

==> Fetching dependencies for csvkit: ca-certificates, openssl@1.1, sqlite, xz, python@3.11 and six
==> Fetching ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2023-01-10
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:11fe9d0a98a2ac454fa1d
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:11fe9d0a98a2ac
######################################################################## 100.0%
==> Fetching openssl@1.1
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1s
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:d915175bedb146e38d7a2c95e
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d915175bedb146
######################################################################## 100.0%
==> Fetching sqlite
==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/manifests/3.40.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/blobs/sha256:ebdcd895a537933c8ae0111a96b02a
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ebdcd895a53793
######################################################################## 100.0%
==> Fetching xz
==> Downloading https://ghcr.io/v2/homebrew/core/xz/manifests/5.4.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/xz/blobs/sha256:a3c40525ab04986a06dc672be4912207c5
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:a3c40525ab0498
######################################################################## 100.0%
Error: python@3.11: the bottle needs the Apple Command Line Tools to be installed.
  You can install them, if desired, with:
    xcode-select --install🈁

If you're feeling brave, you can try to install from source with:
  brew install --build-from-source python@3.11🈁

It is expected behaviour that most formulae will fail to build from source.
It is expected behaviour that Homebrew will be buggy and slow when building from source.
Do not create any issues about failures building from source on Homebrew's GitHub repositories.
Do not create any issues building from source even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help building from source from MacHomebrew on Twitter.
You may ask for help building from source in Homebrew's discussions but are unlikely to receive a response.
If building from source fails, try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
$

  • 警告が2つ出てエラーになった.
    • xcodeのコマンドラインツールが入ってない.
    • Pythonのバージョンが古い.

python3のバージョンを確認.


$ /usr/local/bin/python3 -i🆑
Python 3.10.8 (main, Oct 13 2022, 10:18:28) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit();🆑
$

  • 3.10.8なの古いことが確認できた.
  • --build-from-sourceと書いてあるので,コンパイラとしてのXcodeのコマンドツールのインストールも必要.

xcodeのコマンドラインツールをイ ンストールする.


$ xcode-select --install🆑
xcode-select: note: install requested for command line developer tools
$

  • GUIでインストールする.
  • とにかく遅い.


  • 動作確認は特にしない.

python3.11をインストール


$ brew install --build-from-source python@3.11🆑
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).

You have 61 outdated formulae and 1 outdated cask installed.
You can upgrade them with brew upgrade
or list them with brew outdated.

==> Fetching dependencies for python@3.11: ca-certificates, openssl@1.1, sqlite and xz
==> Fetching ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2023-01-10
Already downloaded: /Users/ujpadmin/Library/Caches/Homebrew/downloads/927414ed081d996b84d938be6af4d2639403b4d2bee3cc29268d0844999da180--ca-==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/Already downloaded: /Users/ujpadmin/Library/Caches/Homebrew/downloads/ca2448928ab98c455b5e46d4a6604247a151ab0f4e60553dbb5c6aecd2e1df3c--ca-==> Fetching openssl@1.1certificates--2023-01-10.all.bottle.tar.gzsha256:11fe9d0a98a2ac454fa1db95762a697c3340f46560ff27e5e9db8fdeb003f17ecertificates-2023-01-10.bottle_mani==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1sfest.json
Already downloaded: /Users/ujpadmin/Library/Caches/Homebrew/downloads/0bd540a808ade4448d977fc4dc9711d8ea9a9b36a677e29a00f8ef821f7be88b--==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:d915175bedb146e38d7a2c95e86888a60a5058a5cd21f835813d43d1372a29d9openssl@1.1-1.1.1s.bottle_manifest.json
Already downloaded: /Users/ujpadmin/Library/Caches/Homebrew/downloads/b53469e355bab26f3dbdbbfbd38bbb389ea554cb6364d5069e8238e5ae27a323--==> Fetching sqliteopenssl@1.1--1.1.1s.monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/manifests/3.40.1
Already downloaded: /Users/ujpadmin/Library/Caches/Homebrew/downloads/7fd91ab10b1f27fb37534ed0c5e09b611d2ab5bc8d1e02eedb0b02fbdcf297c3--==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/blobs/sha256:ebdcd895a537933c8ae0111a96b02aa7e2ac8f8c991f0c3e4d9ec250619a29e5sqlite-3.40.1.bottle_manifest.json
Already downloaded: /Users/ujpadmin/Library/Caches/Homebrew/downloads/bee2542e3fca849d9470f4cbdbe13f5e75eacb904c829fd91124f4a246db4169--==> Fetching xzsqlite--3.40.1.monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/xz/manifests/5.4.1
Already downloaded: /Users/ujpadmin/Library/Caches/Homebrew/downloads/50832bf13dbc3fee17aae88a9a1b882971b78b8ae6377608d664d7b3eb5f2314--==> Downloading https://ghcr.io/v2/homebrew/core/xz/blobs/sha256:a3c40525ab04986a06dc672be4912207c55363298aeb9a7e32375007b8f6c5dfxz-5.4.1.bottle_manifest.json
Already downloaded: /Users/ujpadmin/Library/Caches/Homebrew/downloads/d82493fe3629288ac131ce3443540cc59a6f0546b963cbe21b986175776fc7b9--==> Fetching python@3.11xz--5.4.1.monterey.bottle.tar.gz
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/6d2fba8de3159182025237d373a6f4f78b8bd203/python/3.11-sysconfig.diff
######################################################################## 100.0%
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/a1618a5005d0b01d63b720321806820a03432f1a/python/3.10-distutils-schem
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/b6/21/cb9a8d0b2c8597c83fce8e9c02884bce3d4951e41e807fc35791c6b23d9a/setuptools-65.6.3.ta
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/a3/50/c4d2727b99052780aad92c7297465af5fe6eec2dbae490aa9763273ffdc1/pip-22.3.1.tar.gz
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/a2/b8/6a06ff0f13a00fc3c3e7d222a995526cbca26c1ad107691b6b1badbbabf1/wheel-0.38.4.tar.gz
######################################################################## 100.0%
==> Downloading https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tgz
######################################################################## 100.0%
==> Installing dependencies for python@3.11: ca-certificates, openssl@1.1, sqlite and xz
==> Installing python@3.11 dependency: ca-certificates
==> Pouring ca-certificates--2023-01-10.all.bottle.tar.gz
==> Regenerating CA certificate bundle from keychain, this may take a while...
🍺  /usr/local/Cellar/ca-certificates/2023-01-10: 3 files, 216.9KB
==> Installing python@3.11 dependency: openssl@1.1
==> Pouring openssl@1.1--1.1.1s.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/openssl@1.1/1.1.1s: 8,101 files, 18.5MB
==> Installing python@3.11 dependency: sqlite
==> Pouring sqlite--3.40.1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/sqlite/3.40.1: 11 files, 4.4MB
==> Installing python@3.11 dependency: xz
==> Pouring xz--5.4.1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/xz/5.4.1: 95 files, 1.6MB
==> Installing python@3.11
==> Patching
==> Applying 3.11-sysconfig.diff
patching file Lib/sysconfig.py
==> Applying 3.10-distutils-scheme.diff
patching file Lib/distutils/command/install.py
==> ./configure --prefix=/usr/local/Cellar/python@3.11/3.11.1 --enable-ipv6 --datarootdir=/usr/local/Cellar/python@3.11/3.11.1/share --datadir=
==> make
==> make altinstall PYTHONAPPSDIR=/usr/local/Cellar/python@3.11/3.11.1
==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python@3.11/3.11.1/share/python@3.11
==> /usr/local/Cellar/python@3.11/3.11.1/bin/python3.11 -m venv /private/tmp/pythonA3.11-20230128-56017-sd7r1j/Python-3.11.1/whl_build
==> /private/tmp/pythonA3.11-20230128-56017-sd7r1j/Python-3.11.1/whl_build/bin/pip3 install -v --no-deps --no-binary :all: --no-index --no-buil
==> /private/tmp/pythonA3.11-20230128-56017-sd7r1j/Python-3.11.1/whl_build/bin/pip3 wheel -v --no-deps --no-binary :all: --no-index --no-build-
==> /private/tmp/pythonA3.11-20230128-56017-sd7r1j/Python-3.11.1/whl_build/bin/pip3 wheel -v --no-deps --no-binary :all: --no-index --no-build-
==> /private/tmp/pythonA3.11-20230128-56017-sd7r1j/Python-3.11.1/whl_build/bin/pip3 wheel -v --no-deps --no-binary :all: --no-index --no-build-
==> /usr/local/Cellar/python@3.11/3.11.1/bin/python3.11 -m ensurepip
==> /usr/local/Cellar/python@3.11/3.11.1/bin/python3.11 -m pip install -v --no-deps --no-index --upgrade --isolated --target=/usr/local/lib/pyt
==> Caveats
Python has been installed as
  /usr/local/bin/python3.11

Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to
`python3.11`, `python3.11-config`, `pip3.11` etc., respectively, have been installed into
  /usr/local/opt/python@3.11/libexec/bin

If you do not need a specific version of Python, and always want Homebrew's `python3` in your PATH:
  brew install python3

You can install Python packages with
  pip3.11 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.11/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install python-tk@3.11

gdbm (`dbm.gnu`) is no longer included in this formula, but it is available separately:
  brew install python-gdbm@3.11
`dbm.ndbm` changed database backends in Homebrew Python 3.11.
If you need to read a database from a previous Homebrew Python created via `dbm.ndbm`,
you'll need to read your database using the older version of Homebrew Python and convert to another format.
`dbm` still defaults to `dbm.gnu` when it is installed.

For more information about Homebrew and Python, see: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/python@3.11/3.11.1: 8,108 files, 192.8MB, built in 12 minutes 46 seconds
==> Running `brew cleanup python@3.11`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Upgrading 14 dependents of upgraded formulae:
Disable this behaviour by setting HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
binwalk 2.3.3_1 -> 2.3.3_2, curl 7.85.0 -> 7.87.0, gnutls 3.7.8 -> 3.7.8_1, imagemagick 7.1.0-51 -> 7.1.0-58_1, nghttp2 1.50.0 -> 1.51.0, nginx 1.23.2 -> 1.23.3, node 18.11.0 -> 19.5.0, numpy 1.23.4 -> 1.24.1, pillow 9.2.0_1 -> 9.4.0, python@3.10 3.10.8 -> 3.10.9, python@3.9 3.9.15 -> 3.9.16, tcl-tk 8.6.12_1 -> 8.6.13, unbound 1.17.0 -> 1.17.1, wget 1.21.3 -> 1.21.3_1
==> Fetching dependencies for curl: libunistring, libidn2 and libnghttp2
==> Fetching libunistring
==> Downloading https://ghcr.io/v2/homebrew/core/libunistring/manifests/1.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libunistring/blobs/sha256:73ef01fda8958a495f4d7031cb8d270432d4ae2f11760190676762b95ac7c0f4
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:73ef01fda8958a495f4d7031cb8d270432d4ae2f11760190676762b95a
######################################################################## 100.0%
==> Fetching libidn2
==> Downloading https://ghcr.io/v2/homebrew/core/libidn2/manifests/2.3.4_1-1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libidn2/blobs/sha256:5dcfc410f76c7885fffea633054c58c61e8a5dd2a6cfae33c2ea94e27ae0e96b
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:5dcfc410f76c7885fffea633054c58c61e8a5dd2a6cfae33c2ea94e27a
######################################################################## 100.0%
==> Fetching libnghttp2
==> Downloading https://ghcr.io/v2/homebrew/core/libnghttp2/manifests/1.51.0-1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libnghttp2/blobs/sha256:d94c9ee54c042c8d8608fcbd4cee72e0c42dda8e46aee5c6967f8e37d660de54
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d94c9ee54c042c8d8608fcbd4cee72e0c42dda8e46aee5c6967f8e37d6
######################################################################## 100.0%
==> Fetching curl
==> Downloading https://ghcr.io/v2/homebrew/core/curl/manifests/7.87.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/curl/blobs/sha256:2fd90860e86005f871b2c86d8ec1a9151a49bb79939b8dfbb9416141176575c9
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:2fd90860e86005f871b2c86d8ec1a9151a49bb79939b8dfbb941614117
######################################################################## 100.0%
==> Fetching tcl-tk
==> Downloading https://ghcr.io/v2/homebrew/core/tcl-tk/manifests/8.6.13
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/tcl-tk/blobs/sha256:e175685883ef770c7220b5c0b3058acd61dedddc8bbefae348828b68cbeb6514
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:e175685883ef770c7220b5c0b3058acd61dedddc8bbefae348828b68cb
######################################################################## 100.0%
==> Fetching dependencies for imagemagick: libpng, fontconfig, little-cms2, highway, imath, webp, jpeg-xl, aom, libde265, pcre2, glib, libheif, jasper, libomp and libraw
==> Fetching libpng
==> Downloading https://ghcr.io/v2/homebrew/core/libpng/manifests/1.6.39
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libpng/blobs/sha256:f7217880961411f37b5ba86376f5a6772bf45d1ae98ee86a01677439ce381cc0
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:f7217880961411f37b5ba86376f5a6772bf45d1ae98ee86a01677439ce
######################################################################## 100.0%
==> Fetching fontconfig
==> Downloading https://ghcr.io/v2/homebrew/core/fontconfig/manifests/2.14.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/fontconfig/blobs/sha256:e910d7850f921d5d0b5bdd50080c3985213e2a0eff0181bab4fd6f375d386862
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:e910d7850f921d5d0b5bdd50080c3985213e2a0eff0181bab4fd6f375d
######################################################################## 100.0%
==> Fetching little-cms2
==> Downloading https://ghcr.io/v2/homebrew/core/little-cms2/manifests/2.14
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/little-cms2/blobs/sha256:57a938e19b097c8b0b7da9e8969678ec5f76c6332ad0f5122dce4a5558a93817
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:57a938e19b097c8b0b7da9e8969678ec5f76c6332ad0f5122dce4a5558
######################################################################## 100.0%
==> Fetching highway
==> Downloading https://ghcr.io/v2/homebrew/core/highway/manifests/1.0.3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/highway/blobs/sha256:20059832fbfeddd5609e82caf28f0db4d3f5bf3f467ab34b37f394db2d1c66e5
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:20059832fbfeddd5609e82caf28f0db4d3f5bf3f467ab34b37f394db2d
######################################################################## 100.0%
==> Fetching imath
==> Downloading https://ghcr.io/v2/homebrew/core/imath/manifests/3.1.6
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/imath/blobs/sha256:9afc755be66e72fea866b8563934e704bc63ac831cca3b0e3661beb47fdb52ef
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:9afc755be66e72fea866b8563934e704bc63ac831cca3b0e3661beb47f
######################################################################## 100.0%
==> Fetching webp
==> Downloading https://ghcr.io/v2/homebrew/core/webp/manifests/1.3.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/webp/blobs/sha256:a07ca47cda0829022148d2b248972f3c37fd53bfbee6b767f8cbbd1a73e5fafe
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:a07ca47cda0829022148d2b248972f3c37fd53bfbee6b767f8cbbd1a73
######################################################################## 100.0%
==> Fetching jpeg-xl
==> Downloading https://ghcr.io/v2/homebrew/core/jpeg-xl/manifests/0.8.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/jpeg-xl/blobs/sha256:051508b719eabbeaf079ae17366442d1ff4cb93799e706b681b9cde76ccac879
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:051508b719eabbeaf079ae17366442d1ff4cb93799e706b681b9cde76c
######################################################################## 100.0%
==> Fetching aom
==> Downloading https://ghcr.io/v2/homebrew/core/aom/manifests/3.5.0_2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/aom/blobs/sha256:c968ba6f3d7b9010ce712348522aa1f94d9d8a9eda396bf27ffcd1bf96d97894
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c968ba6f3d7b9010ce712348522aa1f94d9d8a9eda396bf27ffcd1bf96
######################################################################## 100.0%
==> Fetching libde265
==> Downloading https://ghcr.io/v2/homebrew/core/libde265/manifests/1.0.9
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libde265/blobs/sha256:2d258e7db5020ce6f359b4825b62b497de6e4a689bb0ad1502e46c49c8b139dc
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:2d258e7db5020ce6f359b4825b62b497de6e4a689bb0ad1502e46c49c8
######################################################################## 100.0%
==> Fetching pcre2
==> Downloading https://ghcr.io/v2/homebrew/core/pcre2/manifests/10.42
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pcre2/blobs/sha256:76ccbd45954e84db49558afca66ff135e615e5c9069bafe519ce9a1029e17530
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:76ccbd45954e84db49558afca66ff135e615e5c9069bafe519ce9a1029
######################################################################## 100.0%
==> Fetching glib
==> Downloading https://ghcr.io/v2/homebrew/core/glib/manifests/2.74.5
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/glib/blobs/sha256:042c7d6a678ebde2d5d5915e8853e0542a41dfb38adfd728e52f4fd69e0b9169
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:042c7d6a678ebde2d5d5915e8853e0542a41dfb38adfd728e52f4fd69e
######################################################################## 100.0%
==> Fetching libheif
==> Downloading https://ghcr.io/v2/homebrew/core/libheif/manifests/1.14.2_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libheif/blobs/sha256:8aee905ee0896d3f2abdcef30319d3f60ce3df84e967f25145bcbabbc07fd17a
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:8aee905ee0896d3f2abdcef30319d3f60ce3df84e967f25145bcbabbc0
######################################################################## 100.0%
==> Fetching jasper
==> Downloading https://ghcr.io/v2/homebrew/core/jasper/manifests/4.0.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/jasper/blobs/sha256:81f52cc0adf0bfaf6d5274fadcba9483ed52ae814452af22147709f111e2b4ec
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:81f52cc0adf0bfaf6d5274fadcba9483ed52ae814452af22147709f111
######################################################################## 100.0%
==> Fetching libomp
==> Downloading https://ghcr.io/v2/homebrew/core/libomp/manifests/15.0.7
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libomp/blobs/sha256:0b944a6bbe8955e7900882b94f1b0b09030d5791191dc5b0c8b3d5d0895f4b12
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:0b944a6bbe8955e7900882b94f1b0b09030d5791191dc5b0c8b3d5d089
######################################################################## 100.0%
==> Fetching libraw
==> Downloading https://ghcr.io/v2/homebrew/core/libraw/manifests/0.21.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libraw/blobs/sha256:33ddfdcf0fbd8d9d0c6bf2408d20b9fd090788ddd2d45bc760d9b78d11b784fa
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:33ddfdcf0fbd8d9d0c6bf2408d20b9fd090788ddd2d45bc760d9b78d11
######################################################################## 100.0%
==> Fetching imagemagick
==> Downloading https://ghcr.io/v2/homebrew/core/imagemagick/manifests/7.1.0-58_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/imagemagick/blobs/sha256:cc480475364d9667d9422fef0a334fe47c7c99b957ac65e9b96e6c4a46526f19
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:cc480475364d9667d9422fef0a334fe47c7c99b957ac65e9b96e6c4a46
######################################################################## 100.0%
==> Fetching nghttp2
==> Downloading https://ghcr.io/v2/homebrew/core/nghttp2/manifests/1.51.0-1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/nghttp2/blobs/sha256:78bc8f7d368a6a08609f235f1a3b976b3dfb965e3e1bf41425952f0b089cdbb8
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:78bc8f7d368a6a08609f235f1a3b976b3dfb965e3e1bf41425952f0b08
######################################################################## 100.0%
==> Fetching nginx
==> Downloading https://ghcr.io/v2/homebrew/core/nginx/manifests/1.23.3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/nginx/blobs/sha256:2abd6923892bea21c46f5b70d18051a25560af9196a9b0963faac05f5dff17c9
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:2abd6923892bea21c46f5b70d18051a25560af9196a9b0963faac05f5d
######################################################################## 100.0%
==> Fetching dependencies for node: icu4c
==> Fetching icu4c
==> Downloading https://ghcr.io/v2/homebrew/core/icu4c/manifests/72.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/icu4c/blobs/sha256:ec1d2f2fe462d2cbe9775e48d5c4231af2b265f946de3902e0e042619c8ac205
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ec1d2f2fe462d2cbe9775e48d5c4231af2b265f946de3902e0e042619c
######################################################################## 100.0%
==> Fetching node
==> Downloading https://ghcr.io/v2/homebrew/core/node/manifests/19.5.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/node/blobs/sha256:bba9b21e2f09edf307aac74d6142578ab2a59d4ea1889bfc091810c821d5c549
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:bba9b21e2f09edf307aac74d6142578ab2a59d4ea1889bfc091810c821
######################################################################## 100.0%
==> Fetching dependencies for numpy: mpfr and libmpc
==> Fetching mpfr
==> Downloading https://ghcr.io/v2/homebrew/core/mpfr/manifests/4.2.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/mpfr/blobs/sha256:f5901c68e23d7ffbe0b58f1f6e89a57d63d7a9ab167df19c2ea3fc0f89fa217e
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:f5901c68e23d7ffbe0b58f1f6e89a57d63d7a9ab167df19c2ea3fc0f89
######################################################################## 100.0%
==> Fetching libmpc
==> Downloading https://ghcr.io/v2/homebrew/core/libmpc/manifests/1.3.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libmpc/blobs/sha256:c32f2c3fe7ab06e308e6fa74874e1d4d92ff6eb3598da6e0f8e6fa7a333350f5
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c32f2c3fe7ab06e308e6fa74874e1d4d92ff6eb3598da6e0f8e6fa7a33
######################################################################## 100.0%
==> Fetching numpy
==> Downloading https://ghcr.io/v2/homebrew/core/numpy/manifests/1.24.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/numpy/blobs/sha256:ec1d6ef9858e0e0fb54bcbae4d84a38a93324920ea21f7d116822b35eaa6c44b
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ec1d6ef9858e0e0fb54bcbae4d84a38a93324920ea21f7d116822b35ea
######################################################################## 100.0%
==> Fetching dependencies for pillow: libimagequant, libxau, libxdmcp, libx11, libxext, libxrender, pixman, harfbuzz and libraqm
==> Fetching libimagequant
==> Downloading https://ghcr.io/v2/homebrew/core/libimagequant/manifests/4.1.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libimagequant/blobs/sha256:d70767ef60a95d6dea38969cc1642c58c8f099fcab9fc2b26fb4ceff03427333
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d70767ef60a95d6dea38969cc1642c58c8f099fcab9fc2b26fb4ceff03
######################################################################## 100.0%
==> Fetching libxau
==> Downloading https://ghcr.io/v2/homebrew/core/libxau/manifests/1.0.11
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libxau/blobs/sha256:3b8790c3aaf98e0ce10fd088f66b2591e6b5fb8b6b95df8ec254f389e15f81cf
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:3b8790c3aaf98e0ce10fd088f66b2591e6b5fb8b6b95df8ec254f389e1
######################################################################## 100.0%
==> Fetching libxdmcp
==> Downloading https://ghcr.io/v2/homebrew/core/libxdmcp/manifests/1.1.4
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libxdmcp/blobs/sha256:16a26bf976f76e256466dc045e9691ef3cae5427fb7205274f17a1b37372c67b
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:16a26bf976f76e256466dc045e9691ef3cae5427fb7205274f17a1b373
######################################################################## 100.0%
==> Fetching libx11
==> Downloading https://ghcr.io/v2/homebrew/core/libx11/manifests/1.8.3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libx11/blobs/sha256:4077385db58902e2ca2adfa41c461ffaf352a38dbd10b3765b82b4d9d7f913dc
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:4077385db58902e2ca2adfa41c461ffaf352a38dbd10b3765b82b4d9d7
######################################################################## 100.0%
==> Fetching libxext
==> Downloading https://ghcr.io/v2/homebrew/core/libxext/manifests/1.3.5
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libxext/blobs/sha256:9682e4720a940f352af2cea9e4633cdf14947e23b640bac524e1b3674b9493a9
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:9682e4720a940f352af2cea9e4633cdf14947e23b640bac524e1b3674b
######################################################################## 100.0%
==> Fetching libxrender
==> Downloading https://ghcr.io/v2/homebrew/core/libxrender/manifests/0.9.11
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libxrender/blobs/sha256:ab54f6ca9a3dc9c86a16813ebc86456a012dace089f51b2c8d16aea72cd78ec5
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ab54f6ca9a3dc9c86a16813ebc86456a012dace089f51b2c8d16aea72c
######################################################################## 100.0%
==> Fetching pixman
==> Downloading https://ghcr.io/v2/homebrew/core/pixman/manifests/0.42.2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pixman/blobs/sha256:f7c0d1f71dd2dae2ab48c6d50ca713f3b7a41d74289b41bc4935909e7e533c2c
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:f7c0d1f71dd2dae2ab48c6d50ca713f3b7a41d74289b41bc4935909e7e
######################################################################## 100.0%
==> Fetching harfbuzz
==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/manifests/6.0.0_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/blobs/sha256:0459ed5214d1ec678d8e9c32d14eaeda53ca741ea71b78f49d27ffd1828f79b2
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:0459ed5214d1ec678d8e9c32d14eaeda53ca741ea71b78f49d27ffd182
######################################################################## 100.0%
==> Fetching libraqm
==> Downloading https://ghcr.io/v2/homebrew/core/libraqm/manifests/0.10.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libraqm/blobs/sha256:d72ed5e00f74a43990141749afa4519425e3af70e444317b51a37e8ed02f7cda
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d72ed5e00f74a43990141749afa4519425e3af70e444317b51a37e8ed0
######################################################################## 100.0%
==> Fetching pillow
==> Downloading https://ghcr.io/v2/homebrew/core/pillow/manifests/9.4.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pillow/blobs/sha256:c1ae6fdc15e381983e671219508adb6003bfa0869b0268491dd94267c9f91d38
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c1ae6fdc15e381983e671219508adb6003bfa0869b0268491dd94267c9
######################################################################## 100.0%
==> Fetching python@3.10
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.10/manifests/3.10.9
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:7e95777f8c614e01f6c94419cf7feb72aa34a7940173a5b04f359ac845b28509
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:7e95777f8c614e01f6c94419cf7feb72aa34a7940173a5b04f359ac845
######################################################################## 100.0%
==> Fetching python@3.9
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/manifests/3.9.16
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/blobs/sha256:f048ad5c291c14a3864312ca807024b95a02909a782dc5e3f2e05c28a7487294
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:f048ad5c291c14a3864312ca807024b95a02909a782dc5e3f2e05c28a7
######################################################################## 100.0%
==> Fetching unbound
==> Downloading https://ghcr.io/v2/homebrew/core/unbound/manifests/1.17.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/unbound/blobs/sha256:9f0b67ee5dd9d83cba390ad705a6f3b434ea364b2b4930e04f0215827c1883a9
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:9f0b67ee5dd9d83cba390ad705a6f3b434ea364b2b4930e04f0215827c
######################################################################## 100.0%
==> Fetching dependencies for binwalk: six
==> Fetching six
==> Downloading https://ghcr.io/v2/homebrew/core/six/manifests/1.16.0_3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/six/blobs/sha256:0dee50367c6facbfc8f65e8a82bcd3e08d43da262b1adff6ccf943ef5bfaf313
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:0dee50367c6facbfc8f65e8a82bcd3e08d43da262b1adff6ccf943ef5b
######################################################################## 100.0%
==> Fetching binwalk
==> Downloading https://ghcr.io/v2/homebrew/core/binwalk/manifests/2.3.3_2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/binwalk/blobs/sha256:68a5e01815f4b7fb6b6518c159c3349eda5131f7e2ec0a0ff466c9010f6e56f8
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:68a5e01815f4b7fb6b6518c159c3349eda5131f7e2ec0a0ff466c9010f
######################################################################## 100.0%
==> Fetching dependencies for wget: openssl@3
==> Fetching openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.0.7
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:8501aeeab59c63a75dd14c1b836269a6effb08058ec7afb35313f954b40d78c3
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:8501aeeab59c63a75dd14c1b836269a6effb08058ec7afb35313f954b4
######################################################################## 100.0%
==> Fetching wget
==> Downloading https://ghcr.io/v2/homebrew/core/wget/manifests/1.21.3_1-1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:f97fc2639cd9d2d037c2bf1a94fa664ef2d81143ce8a1fb5b740ce2eb397889c
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:f97fc2639cd9d2d037c2bf1a94fa664ef2d81143ce8a1fb5b740ce2eb3
######################################################################## 100.0%
==> Fetching dependencies for gnutls: guile
==> Fetching guile
==> Downloading https://ghcr.io/v2/homebrew/core/guile/manifests/3.0.9
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/guile/blobs/sha256:2680f7c109ed8ff19d28846a91d192563d2fe6ce41a6492d0d9e2a416bae6dd9
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:2680f7c109ed8ff19d28846a91d192563d2fe6ce41a6492d0d9e2a416b
######################################################################## 100.0%
==> Fetching gnutls
==> Downloading https://ghcr.io/v2/homebrew/core/gnutls/manifests/3.7.8_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gnutls/blobs/sha256:655e8c46cd3d815b74975797cfc8fcee75b47bafdf437f981788203bc271b2c8
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:655e8c46cd3d815b74975797cfc8fcee75b47bafdf437f981788203bc2
######################################################################## 100.0%
==> Upgrading curl
  7.85.0 -> 7.87.0

==> Installing dependencies for curl: libunistring, libidn2 and libnghttp2
==> Installing curl dependency: libunistring
==> Pouring libunistring--1.1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libunistring/1.1: 56 files, 5MB
==> Installing curl dependency: libidn2
==> Pouring libidn2--2.3.4_1.monterey.bottle.1.tar.gz
🍺  /usr/local/Cellar/libidn2/2.3.4_1: 79 files, 1003.4KB
==> Installing curl dependency: libnghttp2
==> Pouring libnghttp2--1.51.0.monterey.bottle.1.tar.gz
🍺  /usr/local/Cellar/libnghttp2/1.51.0: 13 files, 721.9KB
==> Installing curl
==> Pouring curl--7.87.0.monterey.bottle.tar.gz
==> Caveats
curl is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have curl first in your PATH, run:
  echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> /Users/ujpadmin/.bash_profile

For compilers to find curl you may need to set:
  export LDFLAGS="-L/usr/local/opt/curl/lib"
  export CPPFLAGS="-I/usr/local/opt/curl/include"

For pkg-config to find curl you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/curl/lib/pkgconfig"

==> Summary
🍺  /usr/local/Cellar/curl/7.87.0: 510 files, 4.2MB
==> Running `brew cleanup curl`...
Removing: /usr/local/Cellar/curl/7.85.0... (504 files, 4MB)
==> Upgrading tcl-tk
  8.6.12_1 -> 8.6.13

==> Pouring tcl-tk--8.6.13.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/tcl-tk/8.6.13: 3,070 files, 52.8MB
==> Running `brew cleanup tcl-tk`...
Removing: /usr/local/Cellar/tcl-tk/8.6.12_1... (3,045 files, 51.8MB)
==> Upgrading imagemagick
  7.1.0-51 -> 7.1.0-58_1

==> Installing dependencies for imagemagick: libpng, fontconfig, little-cms2, highway, imath, webp, jpeg-xl, aom, libde265, pcre2, glib, libheif, jasper, libomp and libraw
==> Installing imagemagick dependency: libpng
==> Pouring libpng--1.6.39.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libpng/1.6.39: 27 files, 1.3MB
==> Installing imagemagick dependency: fontconfig
==> Pouring fontconfig--2.14.1.monterey.bottle.tar.gz
==> Regenerating font cache, this may take a while
==> /usr/local/Cellar/fontconfig/2.14.1/bin/fc-cache -frv
🍺  /usr/local/Cellar/fontconfig/2.14.1: 88 files, 2.3MB
==> Installing imagemagick dependency: little-cms2
==> Pouring little-cms2--2.14.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/little-cms2/2.14: 21 files, 1.3MB
==> Installing imagemagick dependency: highway
==> Pouring highway--1.0.3.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/highway/1.0.3: 61 files, 3.4MB
==> Installing imagemagick dependency: imath
==> Pouring imath--3.1.6.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/imath/3.1.6: 49 files, 927KB
==> Installing imagemagick dependency: webp
==> Pouring webp--1.3.0.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/webp/1.3.0: 47 files, 2.5MB
==> Installing imagemagick dependency: jpeg-xl
==> Pouring jpeg-xl--0.8.0.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/jpeg-xl/0.8.0: 41 files, 17.9MB
==> Installing imagemagick dependency: aom
==> Pouring aom--3.5.0_2.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/aom/3.5.0_2: 23 files, 13.7MB
==> Installing imagemagick dependency: libde265
==> Pouring libde265--1.0.9.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libde265/1.0.9: 22 files, 2.3MB
==> Installing imagemagick dependency: pcre2
==> Pouring pcre2--10.42.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/pcre2/10.42: 230 files, 6.4MB
==> Installing imagemagick dependency: glib
==> Pouring glib--2.74.5.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/glib/2.74.5: 449 files, 20.9MB
==> Installing imagemagick dependency: libheif
==> Pouring libheif--1.14.2_1.monterey.bottle.tar.gz
==> /usr/local/opt/shared-mime-info/bin/update-mime-database /usr/local/share/mime
🍺  /usr/local/Cellar/libheif/1.14.2_1: 26 files, 2.8MB
==> Installing imagemagick dependency: jasper
==> Pouring jasper--4.0.0.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/jasper/4.0.0: 44 files, 1.6MB
==> Installing imagemagick dependency: libomp
==> Pouring libomp--15.0.7.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libomp/15.0.7: 7 files, 1.6MB
==> Installing imagemagick dependency: libraw
==> Pouring libraw--0.21.1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libraw/0.21.1: 73 files, 5.7MB
==> Installing imagemagick
==> Pouring imagemagick--7.1.0-58_1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/imagemagick/7.1.0-58_1: 807 files, 28.7MB
==> Running `brew cleanup imagemagick`...
Removing: /usr/local/Cellar/imagemagick/7.1.0-51... (805 files, 30.7MB)
==> Upgrading nghttp2
  1.50.0 -> 1.51.0

==> Pouring nghttp2--1.51.0.monterey.bottle.1.tar.gz
🍺  /usr/local/Cellar/nghttp2/1.51.0: 17 files, 2.3MB
==> Running `brew cleanup nghttp2`...
Removing: /usr/local/Cellar/nghttp2/1.50.0... (17 files, 2.2MB)
==> Upgrading nginx
  1.23.2 -> 1.23.3

==> Pouring nginx--1.23.3.monterey.bottle.tar.gz
==> Caveats
Docroot is: /usr/local/var/www

The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.

nginx will load all files in /usr/local/etc/nginx/servers/.

To restart nginx after an upgrade:
  brew services restart nginx
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/nginx/bin/nginx -g daemon off;
==> Summary
🍺  /usr/local/Cellar/nginx/1.23.3: 26 files, 2.2MB
==> Running `brew cleanup nginx`...
Removing: /usr/local/Cellar/nginx/1.23.2... (26 files, 2.2MB)
==> Upgrading node
  18.11.0 -> 19.5.0

==> Installing dependencies for node: icu4c
==> Installing node dependency: icu4c
==> Pouring icu4c--72.1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/icu4c/72.1: 263 files, 77.9MB
==> Installing node
==> Pouring node--19.5.0.monterey.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/node/19.5.0: 2,153 files, 55.9MB
==> Running `brew cleanup node`...
Removing: /usr/local/Cellar/node/18.11.0... (1,993 files, 49.4MB)
==> Upgrading numpy
  1.23.4 -> 1.24.1

==> Installing dependencies for numpy: mpfr and libmpc
==> Installing numpy dependency: mpfr
==> Pouring mpfr--4.2.0.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/mpfr/4.2.0: 30 files, 3MB
==> Installing numpy dependency: libmpc
==> Pouring libmpc--1.3.1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libmpc/1.3.1: 12 files, 464KB
==> Installing numpy
==> Pouring numpy--1.24.1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/numpy/1.24.1: 1,754 files, 45.6MB
==> Running `brew cleanup numpy`...
Removing: /usr/local/Cellar/numpy/1.23.4... (1,732 files, 45.3MB)
==> Upgrading pillow
  9.2.0_1 -> 9.4.0

==> Installing dependencies for pillow: libimagequant, libxau, libxdmcp, libx11, libxext, libxrender, pixman, harfbuzz and libraqm
==> Installing pillow dependency: libimagequant
==> Pouring libimagequant--4.1.0.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libimagequant/4.1.0: 11 files, 12.7MB
==> Installing pillow dependency: libxau
==> Pouring libxau--1.0.11.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libxau/1.0.11: 21 files, 105.5KB
==> Installing pillow dependency: libxdmcp
==> Pouring libxdmcp--1.1.4.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libxdmcp/1.1.4: 11 files, 113.8KB
==> Installing pillow dependency: libx11
==> Pouring libx11--1.8.3.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libx11/1.8.3: 1,054 files, 7.0MB
==> Installing pillow dependency: libxext
==> Pouring libxext--1.3.5.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libxext/1.3.5: 87 files, 426.9KB
==> Installing pillow dependency: libxrender
==> Pouring libxrender--0.9.11.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libxrender/0.9.11: 12 files, 197.9KB
==> Installing pillow dependency: pixman
==> Pouring pixman--0.42.2.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/pixman/0.42.2: 11 files, 1.3MB
==> Installing pillow dependency: harfbuzz
==> Pouring harfbuzz--6.0.0_1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/harfbuzz/6.0.0_1: 69 files, 8.3MB
==> Installing pillow dependency: libraqm
==> Pouring libraqm--0.10.0.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/libraqm/0.10.0: 11 files, 71.5KB
==> Installing pillow
==> Pouring pillow--9.4.0.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/pillow/9.4.0: 219 files, 4.1MB
==> Running `brew cleanup pillow`...
Removing: /usr/local/Cellar/pillow/9.2.0_1... (326 files, 5.9MB)
==> Upgrading python@3.10
  3.10.8 -> 3.10.9

==> Pouring python@3.10--3.10.9.monterey.bottle.tar.gz
==> /usr/local/Cellar/python@3.10/3.10.9/bin/python3.10 -m ensurepip
==> /usr/local/Cellar/python@3.10/3.10.9/bin/python3.10 -m pip install -v --no-deps --no-index --upgrade --isolated --target=/usr/local/lib/pyt
==> Caveats
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python@3.10/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.10/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install python-tk@3.10

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/python@3.10/3.10.9: 3,108 files, 56.4MB
==> Running `brew cleanup python@3.10`...
Removing: /usr/local/Cellar/python@3.10/3.10.8... (3,141 files, 57MB)
Warning: Directory not empty @ dir_s_rmdir - /usr/local/Cellar/python@3.10/3.10.8
==> Upgrading python@3.9
  3.9.15 -> 3.9.16

==> Pouring python@3.9--3.9.16.monterey.bottle.tar.gz
==> /usr/local/Cellar/python@3.9/3.9.16/bin/python3.9 -m ensurepip
==> /usr/local/Cellar/python@3.9/3.9.16/bin/python3.9 -m pip install -v --no-deps --no-index --upgrade --isolated --target=/usr/local/lib/pytho
==> Caveats
Python has been installed as
  /usr/local/bin/python3.9

Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to
`python3.9`, `python3.9-config`, `pip3.9` etc., respectively, have been installed into
  /usr/local/opt/python@3.9/libexec/bin

You can install Python packages with
  pip3.9 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.9/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install python-tk@3.9

If you do not need a specific version of Python, and always want Homebrew's `python3` in your PATH:
  brew install python3

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/python@3.9/3.9.16: 3,066 files, 55.4MB
==> Running `brew cleanup python@3.9`...
Removing: /usr/local/Cellar/python@3.9/3.9.15... (3,069 files, 55.6MB)
==> Upgrading unbound
  1.17.0 -> 1.17.1

==> Pouring unbound--1.17.1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/unbound/1.17.1: 58 files, 5.7MB
==> Running `brew cleanup unbound`...
Removing: /usr/local/Cellar/unbound/1.17.0... (58 files, 5.9MB)
==> Upgrading binwalk
  2.3.3_1 -> 2.3.3_2

==> Installing dependencies for binwalk: six
==> Installing binwalk dependency: six
==> Pouring six--1.16.0_3.all.bottle.tar.gz
🍺  /usr/local/Cellar/six/1.16.0_3: 20 files, 122.4KB
==> Installing binwalk
==> Pouring binwalk--2.3.3_2.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/binwalk/2.3.3_2: 1,795 files, 43.7MB
==> Running `brew cleanup binwalk`...
Removing: /usr/local/Cellar/binwalk/2.3.3_1... (1,831 files, 44.7MB)
==> Upgrading wget
  1.21.3 -> 1.21.3_1

==> Installing dependencies for wget: openssl@3
==> Installing wget dependency: openssl@3
==> Pouring openssl@3--3.0.7.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/openssl@3/3.0.7: 6,454 files, 28.3MB
==> Installing wget
==> Pouring wget--1.21.3_1.monterey.bottle.1.tar.gz
🍺  /usr/local/Cellar/wget/1.21.3_1: 89 files, 4.2MB
==> Running `brew cleanup wget`...
Removing: /usr/local/Cellar/wget/1.21.3... (89 files, 4.2MB)
==> Upgrading gnutls
  3.7.8 -> 3.7.8_1

==> Installing dependencies for gnutls: guile
==> Installing gnutls dependency: guile
==> Pouring guile--3.0.9.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/guile/3.0.9: 848 files, 59.5MB
==> Installing gnutls
==> Pouring gnutls--3.7.8_1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/gnutls/3.7.8_1: 1,288 files, 11MB
==> Running `brew cleanup gnutls`...
Removing: /usr/local/Cellar/gnutls/3.7.8... (1,288 files, 11.1MB)
==> Checking for dependents of upgraded formulae...
==> No broken dependents found!
==> Caveats
==> python@3.11
Python has been installed as
  /usr/local/bin/python3.11

Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to
`python3.11`, `python3.11-config`, `pip3.11` etc., respectively, have been installed into
  /usr/local/opt/python@3.11/libexec/bin

If you do not need a specific version of Python, and always want Homebrew's `python3` in your PATH:
  brew install python3

You can install Python packages with
  pip3.11 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.11/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install python-tk@3.11

gdbm (`dbm.gnu`) is no longer included in this formula, but it is available separately:
  brew install python-gdbm@3.11
`dbm.ndbm` changed database backends in Homebrew Python 3.11.
If you need to read a database from a previous Homebrew Python created via `dbm.ndbm`,
you'll need to read your database using the older version of Homebrew Python and convert to another format.
`dbm` still defaults to `dbm.gnu` when it is installed.

For more information about Homebrew and Python, see: https://docs.brew.sh/Homebrew-and-Python
==> curl
curl is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have curl first in your PATH, run:
  echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> /Users/ujpadmin/.bash_profile

For compilers to find curl you may need to set:
  export LDFLAGS="-L/usr/local/opt/curl/lib"
  export CPPFLAGS="-I/usr/local/opt/curl/include"

For pkg-config to find curl you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/curl/lib/pkgconfig"

==> nginx
Docroot is: /usr/local/var/www

The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.

nginx will load all files in /usr/local/etc/nginx/servers/.

To restart nginx after an upgrade:
  brew services restart nginx
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/nginx/bin/nginx -g daemon off;
==> node
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> python@3.10
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python@3.10/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.10/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install python-tk@3.10

See: https://docs.brew.sh/Homebrew-and-Python
==> python@3.9
Python has been installed as
  /usr/local/bin/python3.9

Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to
`python3.9`, `python3.9-config`, `pip3.9` etc., respectively, have been installed into
  /usr/local/opt/python@3.9/libexec/bin

You can install Python packages with
  pip3.9 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.9/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install python-tk@3.9

If you do not need a specific version of Python, and always want Homebrew's `python3` in your PATH:
  brew install python3

See: https://docs.brew.sh/Homebrew-and-Python
$

  • インストールしたPython3.11を確認.


$ ls -la /usr/local/bin/python3.11🆑
lrwxr-xr-x 1 ujpadmin admin 43  1 28 01:32 /usr/local/bin/python3.11 -> ../Cellar/python@3.11/3.11.1/bin/python3.11
[MacPro2013:ujpadmin 01:46:43 ~ ]
$ /usr/local/bin/python3.11 -i
Python 3.11.1 (main, Jan 27 2023, 16:27:20) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit();🆑
$

  • 確認できた.

python3へのリンクを張り替える

  • 現在はpython3は3.10のバイナリへリンクが貼られているので,3.11へ変更する.
  • まずは現在の設定を確認.


$ ls -la /usr/local/bin/python3🆑
lrwxr-xr-x 1 ujpadmin admin 40  1 28 01:37 /usr/local/bin/python3 -> ../Cellar/python@3.10/3.10.9/bin/python3
$

  • 3.10.9へのリンクが設定されている.
  • 新しくインストールした3.11のパスを確認.


$ ls -la /usr/local/bin/python3.11
lrwxr-xr-x 1 ujpadmin admin 43  1 28 01:32 /usr/local/bin/python3.11 -> ../Cellar/python@3.11/3.11.1/bin/python3.11
$

  • シンボリックリンクを切り替える.

$ ln -nfs /usr/local/Cellar/python\@3.11/3.11.1/bin/python3.11 /usr/local/bin/python3
$ ls -la /usr/local/bin/python3
lrwxr-xr-x 1 ujpadmin admin 51  1 28 01:56 /usr/local/bin/python3 -> /usr/local/Cellar/python@3.11/3.11.1/bin/python3.11
$

  • 切り替わった.

再度csvkitのインストールを実行


$ brew install csvkit🆑
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).

You have 11 outdated formulae and 1 outdated cask installed.
You can upgrade them with brew upgrade
or list them with brew outdated.

==> Fetching csvkit
==> Downloading https://ghcr.io/v2/homebrew/core/csvkit/manifests/1.1.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/csvkit/blobs/sha256:0661889df8bd5d67aaad4524bd155951326cf408f47b34815b12d006aecdefa0
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:0661889df8bd5d67aaad4524bd155951326cf408f47b34815b12d006ae
######################################################################## 100.0%
==> Pouring csvkit--1.1.0.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/csvkit/1.1.0: 3,223 files, 50MB
==> Running `brew cleanup csvkit`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
$

  • インストールされたモジュールを確認する.


$ ls -la /usr/local/Cellar/csvkit/1.1.0/bin🆑
total 0
drwxr-xr-x 16 ujpadmin admin 512  1  4 03:21 .
drwxr-xr-x 10 ujpadmin admin 320  1 28 02:07 ..
lrwxr-xr-x  1 ujpadmin admin  23  1  4 03:21 csvclean -> ../libexec/bin/csvclean
lrwxr-xr-x  1 ujpadmin admin  21  1  4 03:21 csvcut -> ../libexec/bin/csvcut
lrwxr-xr-x  1 ujpadmin admin  24  1  4 03:21 csvformat -> ../libexec/bin/csvformat
lrwxr-xr-x  1 ujpadmin admin  22  1  4 03:21 csvgrep -> ../libexec/bin/csvgrep
lrwxr-xr-x  1 ujpadmin admin  22  1  4 03:21 csvjoin -> ../libexec/bin/csvjoin
lrwxr-xr-x  1 ujpadmin admin  22  1  4 03:21 csvjson -> ../libexec/bin/csvjson
lrwxr-xr-x  1 ujpadmin admin  22  1  4 03:21 csvlook -> ../libexec/bin/csvlook
lrwxr-xr-x  1 ujpadmin admin  20  1  4 03:21 csvpy -> ../libexec/bin/csvpy
lrwxr-xr-x  1 ujpadmin admin  22  1  4 03:21 csvsort -> ../libexec/bin/csvsort
lrwxr-xr-x  1 ujpadmin admin  21  1  4 03:21 csvsql -> ../libexec/bin/csvsql
lrwxr-xr-x  1 ujpadmin admin  23  1  4 03:21 csvstack -> ../libexec/bin/csvstack
lrwxr-xr-x  1 ujpadmin admin  22  1  4 03:21 csvstat -> ../libexec/bin/csvstat
lrwxr-xr-x  1 ujpadmin admin  21  1  4 03:21 in2csv -> ../libexec/bin/in2csv
lrwxr-xr-x  1 ujpadmin admin  22  1  4 03:21 sql2csv -> ../libexec/bin/sql2csv
$

  • 実態のパスを確認.


$ ls -la /usr/local/Cellar/csvkit/1.1.0/libexec/bin/🆑
total 124
drwxr-xr-x 31 ujpadmin admin   992  1 28 02:07 .
drwxr-xr-x  6 ujpadmin admin   192  1 28 02:07 ..
-rw-r--r--  1 ujpadmin admin  9033  1  4 03:21 Activate.ps1
-rw-r--r--  1 ujpadmin admin  2011  1 28 02:07 activate
-rw-r--r--  1 ujpadmin admin   937  1 28 02:07 activate.csh🈁
-rw-r--r--  1 ujpadmin admin  2217  1 28 02:07 activate.fish
-rwxr-xr-x  1 ujpadmin admin   994  1 28 02:07 csvclean
-rwxr-xr-x  1 ujpadmin admin   990  1 28 02:07 csvcut
-rwxr-xr-x  1 ujpadmin admin   996  1 28 02:07 csvformat
-rwxr-xr-x  1 ujpadmin admin   992  1 28 02:07 csvgrep
-rwxr-xr-x  1 ujpadmin admin   992  1 28 02:07 csvjoin
-rwxr-xr-x  1 ujpadmin admin   992  1 28 02:07 csvjson
-rwxr-xr-x  1 ujpadmin admin   992  1 28 02:07 csvlook
-rwxr-xr-x  1 ujpadmin admin   988  1 28 02:07 csvpy
-rwxr-xr-x  1 ujpadmin admin   992  1 28 02:07 csvsort
-rwxr-xr-x  1 ujpadmin admin   990  1 28 02:07 csvsql
-rwxr-xr-x  1 ujpadmin admin   994  1 28 02:07 csvstack
-rwxr-xr-x  1 ujpadmin admin   992  1 28 02:07 csvstat
-rwxr-xr-x  1 ujpadmin admin   997  1 28 02:07 futurize
-rwxr-xr-x  1 ujpadmin admin   990  1 28 02:07 in2csv
-rwxr-xr-x  1 ujpadmin admin  1001  1 28 02:07 pasteurize
-rwxr-xr-x  1 ujpadmin admin   258  1 28 02:07 pip
-rwxr-xr-x  1 ujpadmin admin   258  1 28 02:07 pip3
-rwxr-xr-x  1 ujpadmin admin   258  1 28 02:07 pip3.11
-rwxr-xr-x  1 ujpadmin admin   992  1 28 02:07 pybabel
lrwxr-xr-x  1 ujpadmin admin    87  1  4 03:21 python -> ../../../../../opt/python@3.11/Frameworks/Python.framework/Versions/3.11/bin/python3.11
lrwxr-xr-x  1 ujpadmin admin    87  1  4 03:21 python3 -> ../../../../../opt/python@3.11/Frameworks/Python.framework/Versions/3.11/bin/python3.11
lrwxr-xr-x  1 ujpadmin admin    87  1  4 03:21 python3.11 -> ../../../../../opt/python@3.11/Frameworks/Python.framework/Versions/3.11/bin/python3.11
-rwxr-xr-x  1 ujpadmin admin 16107  1 28 02:07 runxlrd.py
-rwxr-xr-x  1 ujpadmin admin  1016  1 28 02:07 slugify
-rwxr-xr-x  1 ujpadmin admin   992  1 28 02:07 sql2csv
$

  • activate.cshの中身を確認.


$ cat /usr/local/Cellar/csvkit/1.1.0/libexec/bin/activate.csh🆑
# This file must be used with "source bin/activate.csh" *from csh*.
# You cannot run it directly.
# Created by Davide Di Blasi <davidedb@gmail.com>.
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>

alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'

# Unset irrelevant variables.
deactivate nondestructive

setenv VIRTUAL_ENV "/usr/local/Cellar/csvkit/1.1.0/libexec"🈁

set _OLD_VIRTUAL_PATH="$PATH"
setenv PATH "$VIRTUAL_ENV/bin:$PATH"🈁


set _OLD_VIRTUAL_PROMPT="$prompt"

if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
    set prompt = "(libexec) $prompt"
    setenv VIRTUAL_ENV_PROMPT "(libexec) "
endif

alias pydoc python -m pydoc

rehash
$

  • cshだけれど,環境変数のVIRTUAL_ENVとファイルパスだけ引用する.
  •  環境変数(パスなど)を設定する


$ export VIRTUAL_ENV=/usr/local/Cellar/csvkit/1.1.0/libexec🆑
$ export PATH="$VIRTUAL_ENV/bin:$PATH"🆑
$ which csvlook🆑
/usr/local/Cellar/csvkit/1.1.0/libexec/bin/csvlook🈁
$ csvlook🆑
usage: csvlook [-h] [-d DELIMITER] [-t] [-q QUOTECHAR] [-u {0,1,2,3}] [-b] [-p ESCAPECHAR]
               [-z FIELD_SIZE_LIMIT] [-e ENCODING] [-L LOCALE] [-S] [--blanks]
               [--date-format DATE_FORMAT] [--datetime-format DATETIME_FORMAT] [-H] [-K SKIP_LINES]
               [-v] [-l] [--zero] [-V] [--max-rows MAX_ROWS] [--max-columns MAX_COLUMNS]
               [--max-column-width MAX_COLUMN_WIDTH] [-y SNIFF_LIMIT] [-I]
               [FILE]
csvlook: error: You must provide an input file or piped data.
$

  • ここまでで動作するようになっている.

チュートリアルをやってみる

  • 公式サイトで用意されているチュートリアルを実行してみる.
  • 専用のディレクトリを作成して,データをダウンロードする.


$ mkdir csvkit_tutorial🆑
$ cd csvkit_tutorial🆑
$ curl -L -O https://raw.githubusercontent.com/wireservice/csvkit/master/examples/realdata/ne_1033_data.xlsx🆑
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 65331  100 65331    0     0   119k      0 --:--:-- --:--:-- --:--:--  119k
$ ls -la🆑
total 64
drwxr-xr-x  3 ujpadmin staff    96  1 28 02:47 .
drwxr-xr-x 34 ujpadmin staff  1088  1 28 02:46 ..
-rw-r--r--  1 ujpadmin staff 65331  1 28 02:47 ne_1033_data.xlsx
$

in2csvコマンド

  • Excel形式のファイルをcsvに変換.


$ in2csv ne_1033_data.xlsx > data.csv🆑
$ head data.csv🆑
state,county,fips,nsn,item_name,quantity,ui,acquisition_cost,total_cost,ship_date,federal_supply_category,federal_supply_category_name,federal_supply_class,federal_supply_class_name
NE,ADAMS,31001.0,1005-00-589-1271,"RIFLE,7.62 MILLIMETER",1.0,Each,138.0,138.0,2008-07-11,10.0,WEAPONS,1005.0,"Guns, through 30 mm"
NE,ADAMS,31001.0,1005-00-589-1271,"RIFLE,7.62 MILLIMETER",1.0,Each,138.0,138.0,2008-07-11,10.0,WEAPONS,1005.0,"Guns, through 30 mm"
NE,ADAMS,31001.0,1005-00-589-1271,"RIFLE,7.62 MILLIMETER",1.0,Each,138.0,138.0,2008-07-11,10.0,WEAPONS,1005.0,"Guns, through 30 mm"
NE,ADAMS,31001.0,1005-00-589-1271,"RIFLE,7.62 MILLIMETER",1.0,Each,138.0,138.0,2008-07-11,10.0,WEAPONS,1005.0,"Guns, through 30 mm"
NE,ADAMS,31001.0,1005-00-589-1271,"RIFLE,7.62 MILLIMETER",1.0,Each,138.0,138.0,2008-07-11,10.0,WEAPONS,1005.0,"Guns, through 30 mm"
NE,ADAMS,31001.0,1005-00-589-1271,"RIFLE,7.62 MILLIMETER",1.0,Each,138.0,138.0,2008-07-11,10.0,WEAPONS,1005.0,"Guns, through 30 mm"
NE,BUFFALO,31019.0,1005-00-073-9421,"RIFLE,5.56 MILLIMETER",1.0,Each,499.0,499.0,2008-09-24,10.0,WEAPONS,1005.0,"Guns, through 30 mm"
NE,BUFFALO,31019.0,1005-00-073-9421,"RIFLE,5.56 MILLIMETER",1.0,Each,499.0,499.0,2008-09-24,10.0,WEAPONS,1005.0,"Guns, through 30 mm"
NE,BUFFALO,31019.0,1005-00-073-9421,"RIFLE,5.56 MILLIMETER",1.0,Each,499.0,499.0,2008-09-24,10.0,WEAPONS,1005.0,"Guns, through 30 mm"
$

csvlookコマンド
csvファイルを表形式で表示する.


$ cat csv1.csv🆑
1,1,1,1,1,1
2,2,2,2,2,2
3,3,3,3,3,3
4,4,4,4,4,4
$ csvlook ~/csv1.csv
| 1 | 1_2 | 1_3 | 1_4 | 1_5 | 1_6 |
| - | --- | --- | --- | --- | --- |
| 2 |   2 |   2 |   2 |   2 |   2 |
| 3 |   3 |   3 |   3 |   3 |   3 |
| 4 |   4 |   4 |   4 |   4 |   4 |
$

  • less -Sを使うことで,Excelのように使うことができる.


$ csvlook data.csv|less -S🆑
$

csvcutコマンド

csvファイルの1行目がヘッダ,2行目以降がデータで作られている場合.

$ head -n 3 data.csv
state,county,fips,nsn,item_name,quantity,ui,acquisition_cost,total_cost,ship_date,federal_supply_category,federal_supply_category_name,federal_supply_class,federal_supply_class_name
NE,ADAMS,31001.0,1005-00-589-1271,"RIFLE,7.62 MILLIMETER",1.0,Each,138.0,138.0,2008-07-11,10.0,WEAPONS,1005.0,"Guns, through 30 mm"
NE,ADAMS,31001.0,1005-00-589-1271,"RIFLE,7.62 MILLIMETER",1.0,Each,138.0,138.0,2008-07-11,10.0,WEAPONS,1005.0,"Guns, through 30 mm"
$

  • カラム番号でデータを取り出す.


$ csvcut -c 2,5,6 data.csv|head -n 10
county,item_name,quantity
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
BUFFALO,"RIFLE,5.56 MILLIMETER",1.0
BUFFALO,"RIFLE,5.56 MILLIMETER",1.0
BUFFALO,"RIFLE,5.56 MILLIMETER",1.0
$

  • カラム名でデータを取り出す.


$ csvcut -c county,item_name,quantity data.csv|head -n 10🆑
county,item_name,quantity
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
ADAMS,"RIFLE,7.62 MILLIMETER",1.0
BUFFALO,"RIFLE,5.56 MILLIMETER",1.0
BUFFALO,"RIFLE,5.56 MILLIMETER",1.0
BUFFALO,"RIFLE,5.56 MILLIMETER",1.0
$



広告スペース
Google