4
3

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 5 years have passed since last update.

alternatives で python を 2.7に切り替える

Posted at

気づいたら、aws コマンドが動かなくなっていて、なぜか python が 2.6に戻ってしまっていた。

こんなエラー

Traceback (most recent call last):
  File "/usr/local/bin/aws", line 19, in <module>
    import awscli.clidriver
ImportError: No module named awscli.clidriver
$ alternatives --display python
python - ステータスは手動です。
リンクは現在 /usr/bin/python2.6 を指しています。
/usr/bin/python2.6 - 優先項目 2600
 :
 :
/usr/bin/python2.7 - 優先項目 27000

2.7の方を指定。

$ sudo alternatives --set python /usr/bin/python2.7

$ python -V
Python 2.7.9

もどった。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?