NI-Lab.

nilog:

← 前の日 2022-02-14 次の日 →
← 一年前 一年後 →
Twitter (2022-02-14)
このへんのパッケージが必要。

「$ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential # Debian / Ubuntu」

mysqlclient · PyPI https://pypi.org/project/mysqlclient/
[t] 2022-02-14 18:24:54
関連するかも情報
Ubuntu で先に default-libmysqlclient-dev をインストールしていないとエラーになってしまう。

$ sudo apt install default-libmysqlclient-dev
$ pip3 install mysqlclient
[t] 2022-02-14 18:23:04
このへんのパッケージが必要。

「$ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential # Debian / Ubuntu」

mysqlclient · PyPI https://pypi.org/project/mysqlclient/
[t] 2022-02-14 18:24:54
mysqlclient は import MySQLdb で使える。
[t] 2022-02-14 18:26:43
あ、インターフェースがちがうっぽいな・・・

TypeError: cursor() got an unexpected keyword argument 'named_tuple'
[t] 2022-02-14 18:31:14
mariadb パッケージと互換性があるのは mysql-connector-python パッケージかな。

「cursor = cnx.cursor(named_tuple=True)」

MySQL :: MySQL Connector/Python Developer Guide :: 10.5 cursor.MySQLCursor Class https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor.html
[t] 2022-02-14 18:35:38
"MySQL driver written in Python which does not depend on MySQL C client libraries and implements the DB API v2.0 specification (PEP-249)."

mysql-connector-python · PyPI https://pypi.org/project/mysql-connector-python/
[t] 2022-02-14 18:36:03
pip でインストールできるかな。

"pip install mysql-connector-python"

MySQL :: MySQL Connector/Python Developer Guide :: 4.2 Installing Connector/Python from a Binary Distribution https://dev.mysql.com/doc/connector-python/en/connector-python-installation-binary.html
[t] 2022-02-14 18:37:13
Ubuntu で MySQL Connector/Python をインストール。

$ pip3 install mysql-connector-python

インストールできた。

Successfully installed mysql-connector-python-8.0.28 protobuf-3.19.4
[t] 2022-02-14 18:38:39
mysql-connector-python は import mysql.connector で使える。

MySQL :: MySQL Connector/Python Developer Guide :: 5.1 Connecting to MySQL Using Connector/Python https://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html
[t] 2022-02-14 18:39:52
mariadb パッケージと mysql-connector-python パッケージは同じインターフェースっぽい。

「使用方法は既存の MySQL Connector と同様です」

MariaDB Connector/Python 0.9.52 Alpha リリース https://mariadb.com/ja/resources/blog/mariadb-connector-python/
[t] 2022-02-14 18:41:55
処理がやけに重いのとエラー(;´Д`)

mysql.connector.errors.ProgrammingError: Not all parameters were used in the SQL statement
[t] 2022-02-14 18:51:41
MariaDB のときはクエリに「?」を入れていたけど MySQL の場合は「%s」っぽい。

"Specify variables using %s or %(name)s parameter style"

MySQL :: MySQL Connector/Python Developer Guide :: 10.5.4 MySQLCursor.execute() Method https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-execute.html
[t] 2022-02-14 19:00:16
やっと動いたけど、処理がすごく遅い・・・
[t] 2022-02-14 19:08:57
ちょっと計測してみた感じだとクエリが重いっぽい。
[t] 2022-02-14 19:40:24
「美唄焼鳥の店ではシメにもつそばと言ってかけそばの上に美唄焼鳥をほぐして乗せて食べます」

美唄焼鳥のシメのそばの作り方 レシピ・作り方 by ゆみたろう~目指せ細マッチョ❣️|楽天レシピ https://recipe.rakuten.co.jp/recipe/1110022421/
[t] 2022-02-14 19:41:56
2021年。

「3/19(金)千葉市若葉区「イコアス千城台」に、北海道美唄市発のそば・焼き鳥専門店「美唄(びばい)そば 大地」第一号店をオープン」

焼き鳥の聖地・北海道美唄市のソウルフード「とりモツそば」が千葉でも食べられる!! |株式会社サーズのプレスリリース https://prtimes.jp/main/html/rd/p/000000003.000074054.html
[t] 2022-02-14 19:42:39
「濃い味のスープに負けない、風味の強い太麺のそばがポイントです。鶏の脂と相まって、ツルツルと喉越しの良い食感。炭火でじっくり焼き上げた砂肝、キンカンといった鶏のモツが香ばしい味わいです」

焼き鳥の聖地・北海道美唄市のソウルフード「とりモツそば」が千葉でも https://prtimes.jp/main/html/rd/p/000000003.000074054.html
[t] 2022-02-14 19:43:39
「「とりモツそば」は焼き鳥で飲んだ後のシメとしても大人気。鶏だしの効いたスープにモツを入れ煮込んだ、ちょっと濃い目の味付け。鶏の脂と玉ねぎの旨味が染み渡る味です」

焼き鳥の聖地・北海道美唄市のソウルフード「とりモツそば」が千葉でも食べられる!! https://prtimes.jp/main/html/rd/p/000000003.000074054.html
[t] 2022-02-14 19:44:46
「タマミチは、まだ生み出されていない卵と卵管、キンカンはその卵のことを言います。成熟した雌からしかとれない、希少部位です。卵は一般的なタマゴの黄身より濃厚で、卵管は淡白な味わい」

鶏肉の部位:タマミチ・キンカン 業務用食肉卸|株式会社プレコフーズ https://www.precofoods.co.jp/meat-info/chicken015jpn.html
[t] 2022-02-14 19:46:27
「鶏のキンカンとは、鶏の卵が形になる前の黄身の部分」「卵巣で作られた、まだ卵殻も卵白も付いていない卵黄だけの状態がキンカン」「卵になる前の黄身の部分ではあるがキンカンは卵ではなく「内臓」として取り扱われている」

鶏のキンカンってどこの部位? https://www.olive-hitomawashi.com/column/2021/01/post-13502.html
[t] 2022-02-14 19:48:34
2022年02年14日のnilogをすべて表示する

- NI-Lab.
- Mastodon (@nilab@mastodon-japan.net)
- Twitter (@nilab)
- Timelog (@nilab)
- はてなブックマーク (id:nilab)

Web Services by Yahoo! JAPAN