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

AWS上のUbuntu 16.04 LTSにpipやPython3.6をインストール

More than 1 year has passed since last update.

AWS上のUbuntu 16.04 LTSにpip、Python3.6をインストールしました。

rootになる(sudo実行でもよいけど)

※事前に $ sudo passwd root でrootに入れるようにしておく。

$ su
Password:
#

pip3のインストール

# pip3 -V
The program 'pip3' is currently not installed. You can install it by typing:
apt install python3-pip
# apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-pip
# apt update
...(log)...
# apt install python3-pip
...(log)...
Do you want to continue? [Y/n] Y
...(log)...
# pip3 -V
pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.5)

pip2のインストール

# pip2 -V
The program 'pip2' is currently not installed. You can install it by typing:
apt install python-pip
# apt install python-pip
...(log)...
# pip2 -V
pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)

python3.6のインストール(pipとpython3.6-devも)

# add-apt-repository ppa:jonathonf/python-3.6
...(log)...
# apt-get update
...(log)...
# apt-get install python3.6 python3.6-dev
...(log)...
# wget https://bootstrap.pypa.io/get-pip.py
...(log)...
# pip3 -V
pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.5)
# python3.6 get-pip.py
Collecting pip
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
    100% |????????????????????????????????| 1.3MB 1.2MB/s
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Uninstalling pip-8.1.1:
      Successfully uninstalled pip-8.1.1
Successfully installed pip-9.0.1
# pip3 -V
bash: /usr/bin/pip3: No such file or directory
# pip -V
bash: /usr/bin/pip: No such file or directory
# /usr/local/bin/pip -V
pip 9.0.1 from /usr/local/lib/python3.6/dist-packages (python 3.6)

※上記の通り、get-pip.py を実行すると、以前インストールしたpipはアンインストールされます。

参考URL

https://www.python.jp/install/ubuntu/index.html

TKYK38
Why not register and get more from Qiita?
  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
No 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
ユーザーは見つかりませんでした