Advertisement
Templario_7777

pyenv virtualenv

Jun 24th, 2024 (edited)
686
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.96 KB | None | 0 0
  1. 1** Install Dependencies:
  2.  
  3. sudo apt-get update && sudo apt-get install make build-essential libssl-dev \
  4.     zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
  5.     libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
  6.  
  7. 2** Install Pyenv:
  8.  
  9. curl https://pyenv.run | bash
  10.  
  11. 3** Config ~/.profile (copy and paste):
  12.  
  13. # Load pyenv automatically by appending
  14. # the following to
  15. # ~/.bash_profile if it exists, otherwise ~/.profile (for login shells)
  16. # and ~/.bashrc (for interactive shells) :
  17.  
  18. export PYENV_ROOT="$HOME/.pyenv"
  19. [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
  20. eval "$(pyenv init -)"
  21.  
  22. 4** config ~/.bashrc (copy and paste):
  23.  
  24. eval "$(pyenv virtualenv-init -)"
  25.  
  26. 5** reload enviroment:pyenv install
  27.  
  28. source ~/.bashrcpyenv install
  29.  
  30. 6** Install python version 2.7:
  31.  
  32. pyenv install 2.7
  33.  
  34. 7** create an venv over python version 2.7 (without < >)
  35.  
  36. pyenv virtualenv 2.7 <virtual_env_name>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement