0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

「Unable to find any of pip2, pip to use. pip needs to be installed.」のエラーが出た時

Posted at

反映先のサーバで、pipコマンドを使ってライブラリをインストールしようとしたときに「Unable to find any of pip2, pip to use. pip needs to be installed.」のエラーが出ました。

原因は反映先のサーバではpip3モジュールがインストールされている状態で、pip2がない状態で、pip2を利用してインストールしようとしていたのが原因でした。

ネットで上記エラーを検索すると、ansible_cfgファイルに以下を「ansible_python_interpreter=/usr/bin/python3」を指定すれば解決できると言う情報を見てやってみたんですが、解決できず。。

結局以下のスクリプトで無事pip3でインストールするようになりました。

- name: install selenium
  pip:
    name: selenium
    state: present
    executable: pip3
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?