Last active
October 3, 2018 02:05
-
-
Save moriya9n/22daf53cae550fa91e365e1acd4d7f8a to your computer and use it in GitHub Desktop.
さくらのレンタルサーバーに python3.6 をインストール
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
さくらのレンタルサーバーに 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