LoginSignup
0
0

More than 3 years have passed since last update.

mysql-connector-pythonの更新(特殊例)

Last updated at Posted at 2019-07-17

今回はpython3で
mysql-connector-python-rf==2.2.2を利用していて
mysql-connector-python==8.0.16に乗り換えた話。

mysql-connector-pythonの知識は参考サイトが良い

すごく参考になりました。感謝。
Python3でMySQL Connectorのインストール・接続方法【快適に使う方法を紹介】

乗り換えにあたり躓いた点を紹介

$ pip install mysql-connector-python==8.0.16 //←先に新しい方をインストールしてしまった
$ pip uninstall mysql-connector-python-rf

上記コマンドを実行した後、
import mysql がうまく実行出来なかった。
内部の挙動は把握してないが、多分リンクの切り替えが出来てないとかだろうと予想。

// requirements.txtでインストールしたパッケージを全部アンインストール
$ pip uninstall -y -r requirements.txt

これで解決した。

関係ないけど得た知識

// 依存関係のチェックコマンド
$ pip check

// インスールしているパッケージ一覧
$ pip list -o

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0