Answers for "pyenv ubuntu install"

3

how to install python on ubuntu pyenv

# You need these dependencies for pyenv to work.
sudo apt-get update; 
sudo apt-get install 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
# Runs a script that installs pyenv
curl https://pyenv.run | bash
# Exports the path through these lines into .bashrc
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc 
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc 
echo 'eval "$(pyenv init --path)"' >> ~/.bashrc 
echo 'eval "$(pyenv init -)"' >> ~/.bashrc 
# Make the pyenv available without needing to close terminal
exec $SHELL
pyenv update
which pyenv
# You're ready to run! 
pyenv install --list
pyenv install 2.7.18
pyenv install 3.7.0
pyenv help global
pyenv global 2.7.15 3.7.0
Posted by: Guest on June-27-2021
2

how to create a virtual environment in python ubuntu

python3 -m venv name_environment #this creates the virtual environment

source name_environment/bin/activate #this activates the virtual environment

#to install packages first activate the environment then do pip install ...
Posted by: Guest on December-03-2020
7

install pyenv

# Linux and Mac only (at the moment)
curl https://pyenv.run | bash
Posted by: Guest on April-26-2020
1

pyenv install ubuntu

root@ubuntu:~# apt install -y make build-essential libssl-dev zlib1g-dev 
> libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev
> libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl
> git
Posted by: Guest on August-23-2020

Python Answers by Framework

Browse Popular Code Answers by Language