Skip to content

Commit 14eb5b9

Browse files
committed
.
1 parent a07d26b commit 14eb5b9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

ubuntu-setup.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash -e
2+
3+
# pyenv essentials
4+
curl https://pyenv.run | bash
5+
6+
sudo apt-get install -y curl git-core gcc make zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libssl-dev
7+
sudo apt-get install -y build-essential libncursesw5-dev libgdbm-dev libc6-dev tk-dev
8+
sudo apt-get install -y libffi-dev liblzma-dev
9+
10+
cat > ~/.bash_pyenv << EOF
11+
## pyenv configs
12+
export PYENV_ROOT="$HOME/.pyenv"
13+
export PATH="$PYENV_ROOT/bin:$PATH"
14+
15+
if command -v pyenv 1>/dev/null 2>&1; then
16+
eval "$(pyenv init -)"
17+
fi
18+
EOF
19+
20+
. ~/.bash_pyenv
21+
22+
pyenv install 3.11
23+
pyenv global 3.11
24+
25+
# check it
26+
python --version | grep 3.11
27+
28+
# install poetry to system so packages that depend on it work well
29+
python -mpip install --upgrade pip
30+
python -mpip install poetry

0 commit comments

Comments
 (0)