Help us understand the problem. What is going on with this article?

AWS Cloud9でPython3を使う方法

More than 1 year has passed since last update.

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)
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away