2018年1月8日月曜日

[Python3] ライブラリのインストール方法


【環境】
Google Cloud Platform(GCP)[VMインスタンス]上で実行
OS : Linux(Debian 9.2)
Python3 (3.5.3)

Pythonで利用できる豊富なライブラリのインストール方法です。



よく使うpandasをインストールしてみましょう。
# pip3 install pandas
Collecting pandas
  Downloading pandas-0.22.0-cp35-cp35m-manylinux1_x86_64.whl (25.7MB)
    100% |████████████████████████████████| 25.7MB 56kB/s
Collecting pytz>=2011k (from pandas)
  Using cached pytz-2017.3-py2.py3-none-any.whl
Requirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.5/dist-packages (from pandas)
Requirement already satisfied: python-dateutil>=2 in /usr/local/lib/python3.5/dist-packages (from pandas)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.5/dist-packages (from python-dateutil>=2->pandas)
Installing collected packages: pytz, pandas
Successfully installed pandas-0.22.0 pytz-2017.3

すでにインストールされている場合はこんな感じになる。
# pip3 install numpy
Requirement already satisfied: numpy in /usr/local/lib/python3.5/dist-packages

【参考】

0 件のコメント:

コメントを投稿