Movatterモバイル変換


[0]ホーム

URL:


LoginSignup
25

Go to list of users who liked

14

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

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.

GCEのインスタンスにpython3.7環境を構築するメモ

Last updated atPosted at 2018-05-28

目的

サラのGCEのインスタンス上に python3.7.0 で実行できる環境を pyenv を使って構築するメモです.

環境

ブートディスクイメージ : Debian GNU/Linux 9 (stretch)

手順

以下のコマンドで必要なライブラリをインストール

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \xz-utils tk-dev libffi-dev liblzma-dev python-openssl git

pyenv を ダウンロードしパスを通す

git clone https://github.com/yyuu/pyenv.git ~/.pyenvecho 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profileecho 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profileecho 'eval "$(pyenv init -)"' >> ~/.profilesource ~/.profile
$ pyenv install 3.7.0

インストールが完了したら以下のコマンドでバージョンの確認, 適用をする.

$ pyenv versions$ pyenv global 3.7.0

最後に以下のコマンドを実行して3.7.0 が出力されれば成功

python -V

参考にさせていただいた記事

25

Go to list of users who liked

14
0

Go to list of comments

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
25

Go to list of users who liked

14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?


[8]ページ先頭

©2009-2025 Movatter.jp