-
Notifications
You must be signed in to change notification settings - Fork 12
/
helper-build-python-debian.sh
executable file
·58 lines (46 loc) · 1.29 KB
/
helper-build-python-debian.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env bash
# helper-build-python-debian.sh
#
# Helper to build Python 3.9.5 on Debian based Linux
#
# The most recent version of this project can be obtained with:
# git clone https://github.com/wrljet/hercules-helper.git
# or:
# wget https://github.com/wrljet/hercules-helper/archive/master.zip
#
# Please report errors in this to me so everyone can benefit.
#
# Bill Lewis bill@wrljet.com
#
#-----------------------------------------------------------------------------
#
# This works for me, but should be considered just an example
msg="$(basename "$0"):
This script will install prerequisite packages, and download, build
and install Python 3.9.5.
Your sudo password will be required.
"
echo "$msg"
echo "which -a python3"
which -a python3
echo #
echo "python3 -V"
python3 -V
read -p "Ctrl+C to abort here, or hit return to continue"
#-----------------------------------------------------------------------------
# sudo apt-get install openssl openssl-dev libssl-dev
sudo apt-get install openssl libssl-dev
mkdir -p ~/tools
pushd ~/tools
wget "https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tgz"
tar xfz Python-3.9.5.tgz
cd Python-3.9.5/
./configure
make
sudo make install
hash -r
# cd someplace else so we don't find a cmake in the same directory
cd ..
which -a python3
python3 -V
popd