LoginSignup
37
24

More than 5 years have passed since last update.

AWS Cloud9でPython3を使う方法

Last updated at Posted at 2018-03-03

AWS Cloud9でPython3を使う

下記の3つの手順を実行すればOK

AWS Cloud9のPython Versionを変更

AWS Cloud9のPreferencesの中で変更

スクリーンショット 2018-03-03 15.04.03.png

pythonのaliasを変更

.bashrcのaliasをpython36に変更

# User specific aliases and functions
alias python=python36

書き換え後はsourceコマンドをお忘れなく

update-alternativesを実行

以下を実行

sudo update-alternatives --config python

番号を聞かれるので、2を選ぶ

# .bashrc

There are 2 programs which provide 'python'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/bin/python2.7
   2           /usr/bin/python3.6

Enter to keep the current selection[+], or type selection number: 2

バージョン確認

これで無事AWS Cloud9でPython3が使えるようになります

$ python -V
Python 3.6.2
$ pip -V
pip 9.0.1 from /usr/lib/python3.6/dist-packages (python 3.6)
37
24
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
37
24