Skip to content

Instantly share code, notes, and snippets.

@moriya9n
Last active October 3, 2018 02:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moriya9n/22daf53cae550fa91e365e1acd4d7f8a to your computer and use it in GitHub Desktop.
Save moriya9n/22daf53cae550fa91e365e1acd4d7f8a to your computer and use it in GitHub Desktop.
さくらのレンタルサーバーに python3.6 をインストール
さくらのレンタルサーバーに python3.6 をインストールする方法
===================================================
そのままコンパイルすると pip が使えない(SSLバージョンエラー?)ので、openssl を入れる。
openssl のコンパイル
----------------------------------
wget https://www.openssl.org/source/openssl-1.0.2o.tar.gz
tar xvf openssl-1.0.2o.tar.gz
cd openssl-1.0.2o
./config --prefix=/home/アカウント名/opt/openssl
make install
python のコンパイル
----------------------------------
wget hogehoge
tar xvf hogehoge
cd hogehoge
https://techglimpse.com/install-python-openssl-support-tutorial/
にあるように、
Modules/setup.dist
#_socket socketmodule.c
をアンコメント
#SSL=/usr/local/ssl
#_ssl _ssl.c \
# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
# -L$(SSL)/lib -lssl -lcrypto_
をアンコメント
SSL=/home/アカウント名/opt/openssl
と変更
./configure --prefix=/home/アカウント名/opt/python
make install
python3 -m venv /home/アカウント名/venv などとして使うと便利かも
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment