58
35

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.

pythonコマンドでpython3を実行したい

Posted at

###現状
vmにubuntu serverを入れたら、python2とpython3がインストールされてた。pythonコマンドでpython3を実行したい!ついでにpipも。
pythonではpython2が実行される。
1.PNG
###変更
.bashrcを開く

vim ~/.bashrc

以下のコードを最後の行に追加します

.bashrc
alias python="python3" 
alias pip="pip3" 

保存したら、sourceします。

source ~/.bashrc

###確認
終わったら確認します。
5.PNG
変わっていることが確認できました。

58
35
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
58
35

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?