LoginSignup
4
5

More than 5 years have passed since last update.

pip install twilioしたときにハマったこと

Posted at

以下リファレンスを参考にTwilio Python ヘルパーライブラリーをインストールしたところハマったことがあったので備忘録です。
https://jp.twilio.com/docs/libraries/python

環境

mac:Mojave 10.14.3
Python:2.7.10(macデフォルト)

エラーの内容

pip install twilio コマンドを実行すると以下エラーが発生

pyopenssl 19.0.0 has requirement six>=1.5.2, but you'll have six 1.4.1 which is incompatible.
Cannot uninstall 'pyOpenSSL'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

上記エラーの内容はpyopenssl 19.0.0はsixのバージョンが1.5.2以上が必要です、しかしあなたは互換性の無いsixの1.4.1バージョンを持っています。と言われています。

解決方法

1.インストール済みのパッケージを無視してインストールさせる

以下オプションを追加して、インストール済みのパッケージを無視して再インストールさせます。

--ignore-installed six

// 最終的なコマンド
pip install twilio --ignore-installed six

2.python3を利用する

macデフォルトのpythonではなく、新しくpython3をインストールしてtwilioをインストールします。

python3をインストール

// brewはmacにインストール済みとします。
// brewをインストールしていない人は、「https://brew.sh/index_ja」よりbrewをインストールしてください。
brew install python3

twilioをインストール

pip3 install twilio

そのほか

そのほかパーミッションエラーとかでインストールに失敗するときもあります。
詳細については、公式ドキュメントを参照してください。

4
5
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
4
5