-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyenv.txt
68 lines (56 loc) · 1.78 KB
/
pyenv.txt
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
58
59
60
61
62
63
64
65
66
67
68
dependency-------------------------------
sudo apt update
sudo apt install -y \
make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev \
libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git \
libgdbm-dev libc6-dev lzma
install---------------------------------
curl https://pyenv.run | bash
link to bash-----------
add these lines to both at( ~/.bashrc and ~/.profile ) or (~/.bash_profile if it exists)
new straight-forward------------
# Add pyenv to PATH
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
export --------------
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
[[ -d "$PYENV_ROOT/bin" ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
reload bash by
source ~/.bashrc
source ~/.profile
or
source ~/.bash_profile
verify------
pyenv --version
already installed versions---
pyenv versions
check supported versions-------
pyenv install --list
--------------------------pyenv installed-------------------
install python with pyenv----------------------------
pyenv install 3.8.12
Installed Python-3.8.12 to /home/irfan/.pyenv/versions/3.8.12-----------
pyenv uninstall 3.11.9/envs/speech_env
----------global/local-------------------------------
Install Python 3.11 and set it as the global version:------------------
pyenv install 3.11
pyenv global 3.11
pip install pip --upgrade
pyenv local 3.11
---------------venv by pyenv---------------
create----------
pyenv virtualenv 3.8.12 dashboard_env
activate----------
pyenv activate dashboard_env
pyenv activate speech_env
check python version---
python --version
or
pyenv version