Forked from luzfcb/installing_pyenv_on_ubuntu_based_distros.md
Created
July 3, 2022 16:14
-
-
Save markthomas93/f9cce98eaefea8e2fcbfd677bb225dbe to your computer and use it in GitHub Desktop.
Revisions
-
luzfcb revised this gist
Mar 30, 2022 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,14 +30,14 @@ if ! grep -Eq "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; th source "${HOME}/.bashrc" # install the python versions listed on python_versions variable python_versions="3.10.4 3.9.12 3.8.13 3.7.13 3.6.15 2.7.18" for version in ${python_versions}; do \ # download, compile and install python on the user home pyenv install --skip-existing "${version}"; done # set "python", "python3", "python3.10" to point python3.10.4, # "python3.9" to point python3.9.12 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global ${python_versions} @@ -124,14 +124,14 @@ Close the terminal and open again. ```bash # install the python versions listed on python_versions variable python_versions="3.10.4 3.9.12 3.8.13 3.7.13 3.6.15 2.7.18" for version in ${python_versions}; do \ # download, compile and install python on the user home pyenv install --skip-existing "${version}"; done # set "python", "python3", "python3.10" to point python3.10.4, # "python3.9" to point python3.9.12 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global ${python_versions} -
luzfcb revised this gist
Mar 11, 2022 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git "${HOME}/.pyenv/plugins/pyenv-virtualenvwrapper" # add pyenv required configurations on your .bashrc file if ! grep -Eq "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; then echo -e "\n\nsetup pyenv configuration:\nThe following content was inserted at the end of the ${HOME}/.bashrc file\n"; echo -e '\n#### pyenv config\nif [ -f "$HOME/.pyenv/bin/pyenv" ] && ! type -P pyenv &>/dev/null ; then\n export PYTHON_CONFIGURE_OPTS="--enable-shared"\n export PYTHON_CFLAGS="-O2"\n export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M"\n export PYENV_ROOT="${HOME}/.pyenv"\n export PATH="${PYENV_ROOT}/bin:${PATH}"\n eval "$(pyenv init --path)"\n eval "$(pyenv init -)"\n eval "$(pyenv virtualenv-init -)"\n if [[ ! "$(pyenv which python)" == "/usr/bin/python" ]] ; then \n pyenv virtualenvwrapper_lazy;\n fi\nfi\n#### pyenv config end' | tee --append "${HOME}/.bashrc"; source "${HOME}/.bashrc"; else echo -e "\n\npyenv configuration already installed in ${HOME}/.bashrc"; fi # reload .bashrc to run pyenv configurations @@ -107,7 +107,7 @@ if command -v pyenv &>/dev/null; then export CPPFLAGS="-I${OPEN_SSL_DIR}/include -I${READLINE_DIR}/include -I${SQLITE3_DIR}/include -I${ZLIB_DIR}/include ${CPPFLAGS}" export PKG_CONFIG_PATH="${OPEN_SSL_DIR}/lib/pkgconfig:${READLINE_DIR}/lib/pkgconfig:${SQLITE3_DIR}/lib/pkgconfig:${ZLIB_DIR}/lib/pkgconfig:${PKG_CONFIG_PATH}" export PYTHON_CONFIGURE_OPTS="--enable-shared" export PYTHON_CFLAGS="-O2" # Makes pyenv use aria2c to manage and accelerate the download of the python source code. # Useful to avoid problems on slower or unstable internet connection export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M" -
luzfcb revised this gist
Jan 20, 2022 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -47,7 +47,7 @@ source "${HOME}/.bashrc" # upgrade some basic packages and install virtualenv virtualenvwrapper # on all python versions for version in ${python_versions}; do \ python"${version:0:4}" -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; \ done ``` @@ -139,7 +139,7 @@ pyenv global ${python_versions} # upgrade some basic packages and install virtualenv virtualenvwrapper # on all python versions for version in ${python_versions}; do \ python"${version:0:4}" -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; \ done ``` -
luzfcb revised this gist
Jan 20, 2022 . 1 changed file with 9 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,14 +30,14 @@ if ! grep -Eq "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; th source "${HOME}/.bashrc" # install the python versions listed on python_versions variable python_versions="3.10.2 3.9.10 3.8.12 3.7.12 3.6.15 2.7.18" for version in ${python_versions}; do \ # download, compile and install python on the user home pyenv install --skip-existing "${version}"; done # set "python", "python3", "python3.10" to point python3.10.2, # "python3.9" to point python3.9.10 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global ${python_versions} @@ -53,6 +53,7 @@ done After install use the [virtualenvwrapper](#virtualenvwrapper-quick-tutorial) to create virtualenvs. # ------------------------------------------------------------------------ ## OSX Install the `Xcode Command Line Tools` @@ -123,21 +124,21 @@ Close the terminal and open again. ```bash # install the python versions listed on python_versions variable python_versions="3.10.2 3.9.10 3.8.12 3.7.12 3.6.15 2.7.18" for version in ${python_versions}; do \ # download, compile and install python on the user home pyenv install --skip-existing "${version}"; done # set "python", "python3", "python3.10" to point python3.10.2, # "python3.9" to point python3.9.10 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global ${python_versions} # upgrade some basic packages and install virtualenv virtualenvwrapper # on all python versions for version in ${python_versions}; do \ python"${version:0:3}" -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; \ done @@ -146,6 +147,7 @@ done Close the terminal and open again. # ------------------------------------------------------------------------ ## Virtualenvwrapper quick tutorial -
luzfcb revised this gist
Dec 11, 2021 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,13 +30,13 @@ if ! grep -Eq "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; th source "${HOME}/.bashrc" # install the python versions listed on python_versions variable python_versions="3.10.1 3.9.9 3.8.11 3.7.11 3.6.14 2.7.18" for version in ${python_versions}; do \ # download, compile and install python on the user home pyenv install --skip-existing "${version}"; done # set "python", "python3", "python3.10" to point python3.10.1, # "python3.8" to point python3.8.11 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global ${python_versions} @@ -123,13 +123,13 @@ Close the terminal and open again. ```bash # install the python versions listed on python_versions variable python_versions="3.10.1 3.9.9 3.8.11 3.7.11 3.6.14 2.7.18" for version in ${python_versions}; do \ # download, compile and install python on the user home pyenv install --skip-existing "${version}"; done # set "python", "python3", "python3.10" to point python3.10.1, # "python3.8" to point python3.8.11 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global ${python_versions} -
luzfcb revised this gist
Jul 7, 2021 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,13 +20,14 @@ sudo apt-get install aria2 build-essential curl git libbz2-dev libffi-dev liblzm curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash # install a virtualenvwrapper plugin to pyenv git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git "${HOME}/.pyenv/plugins/pyenv-virtualenvwrapper" # add pyenv required configurations on your .bashrc file if ! grep -Eq "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; then echo -e "\n\nsetup pyenv configuration:\nThe following content was inserted at the end of the ${HOME}/.bashrc file\n"; echo -e '\n#### pyenv config\nif [ -f "$HOME/.pyenv/bin/pyenv" ] && ! type -P pyenv &>/dev/null ; then\n export PYTHON_CONFIGURE_OPTS="--enable-shared"\n export CFLAGS="-O2"\n export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M"\n export PYENV_ROOT="${HOME}/.pyenv"\n export PATH="${PYENV_ROOT}/bin:${PATH}"\n eval "$(pyenv init --path)"\n eval "$(pyenv init -)"\n eval "$(pyenv virtualenv-init -)"\n if [[ ! "$(pyenv which python)" == "/usr/bin/python" ]] ; then \n pyenv virtualenvwrapper_lazy;\n fi\nfi\n#### pyenv config end' | tee --append "${HOME}/.bashrc"; source "${HOME}/.bashrc"; else echo -e "\n\npyenv configuration already installed in ${HOME}/.bashrc"; fi # reload .bashrc to run pyenv configurations source "${HOME}/.bashrc" # install the python versions listed on python_versions variable python_versions="3.9.6 3.8.11 3.7.11 3.6.14 2.7.18" @@ -41,11 +42,11 @@ done pyenv global ${python_versions} # reload .bashrc to run pyenv configurations again source "${HOME}/.bashrc" # upgrade some basic packages and install virtualenv virtualenvwrapper # on all python versions for version in ${python_versions}; do \ python"${version:0:3}" -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; \ done ``` -
luzfcb revised this gist
Jul 7, 2021 . 1 changed file with 15 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -121,23 +121,23 @@ fi Close the terminal and open again. ```bash # install the python versions listed on python_versions variable python_versions="3.9.6 3.8.11 3.7.11 3.6.14 2.7.18" for version in ${python_versions}; do \ # download, compile and install python on the user home pyenv install --skip-existing "${version}"; done # set "python", "python3", "python3.9" to point python3.9.6, # "python3.8" to point python3.8.11 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global ${python_versions} # upgrade some basic packages and install virtualenv virtualenvwrapper # on all python versions for version in ${python_versions}; do \ python"${version:0:3}" -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; \ done ``` -
luzfcb revised this gist
Jul 7, 2021 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,8 +31,8 @@ source $HOME/.bashrc # install the python versions listed on python_versions variable python_versions="3.9.6 3.8.11 3.7.11 3.6.14 2.7.18" for version in ${python_versions}; do \ # download, compile and install python on the user home pyenv install --skip-existing "${version}"; done # set "python", "python3", "python3.9" to point python3.9.6, -
luzfcb revised this gist
Jul 7, 2021 . 1 changed file with 23 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,35 +11,42 @@ will probably work on other newer versions, with no changes, or with few changes # Enter your password when prompted. # your user must be allowed to run "sudo" sudo bash -c "echo -e 'Starting...\n'" sudo apt-get update; # install most common python interpreter itself compile dependencies sudo apt-get install aria2 build-essential curl git libbz2-dev libffi-dev liblzma-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev llvm make tk-dev wget xz-utils zlib1g-dev --yes; # install pyenv curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash # install a virtualenvwrapper plugin to pyenv git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $HOME/.pyenv/plugins/pyenv-virtualenvwrapper # add pyenv required configurations on your .bashrc file if ! egrep -q "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; then echo -e "\n\nsetup pyenv configuration:\nThe following content was inserted at the end of the ${HOME}/.bashrc file\n"; echo -e '\n#### pyenv config\nif [ -f "$HOME/.pyenv/bin/pyenv" ] && ! type -P pyenv &>/dev/null ; then\n export PYTHON_CONFIGURE_OPTS="--enable-shared"\n export CFLAGS="-O2"\n export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M"\n export PYENV_ROOT="${HOME}/.pyenv"\n export PATH="${PYENV_ROOT}/bin:${PATH}"\n eval "$(pyenv init --path)"\n eval "$(pyenv init -)"\n eval "$(pyenv virtualenv-init -)"\n if [[ ! "$(pyenv which python)" == "/usr/bin/python" ]] ; then \n pyenv virtualenvwrapper_lazy;\n fi\nfi\n#### pyenv config end' | tee --append "${HOME}/.bashrc"; source "$HOME/.bashrc"; else echo -e "\n\npyenv configuration already installed in $HOME/.bashrc"; fi # reload .bashrc to run pyenv configurations source $HOME/.bashrc # install the python versions listed on python_versions variable python_versions="3.9.6 3.8.11 3.7.11 3.6.14 2.7.18" for version in ${python_versions}; do \ # download, compile and install python in parallel $(pyenv install --skip-existing "${version}";) & done # set "python", "python3", "python3.9" to point python3.9.6, # "python3.8" to point python3.8.11 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global ${python_versions} # reload .bashrc to run pyenv configurations again source $HOME/.bashrc # upgrade some basic packages and install virtualenv virtualenvwrapper # on all python versions for version in ${python_versions}; do \ python"${version:0:3}" -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; \ done ``` -
luzfcb revised this gist
May 12, 2021 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,8 +22,8 @@ git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $HOME/.pyenv/plug if ! egrep -q "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; then echo -e "\n\nsetup pyenv configuration:\nThe following content was inserted at the end of the ${HOME}/.bashrc file\n"; echo -e '\n#### pyenv config\nif [ -f "$HOME/.pyenv/bin/pyenv" ] && ! type -P pyenv &>/dev/null ; then\n export PYTHON_CONFIGURE_OPTS="--enable-shared"\n export CFLAGS="-O2"\n export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M"\n export PATH="$HOME/.pyenv/bin:$PATH"\n eval "$(pyenv init -)"\n eval "$(pyenv virtualenv-init -)"\n if [[ ! "$(pyenv which python)" == "/usr/bin/python" ]] ; then \n pyenv virtualenvwrapper_lazy;\n fi\nfi\n#### pyenv config end' | tee --append "${HOME}/.bashrc"; source "$HOME/.bashrc"; else echo -e "\n\npyenv configuration already installed in $HOME/.bashrc"; fi # reload .bashrc to run pyenv configurations source $HOME/.bashrc # download and compile python 3.9.5 pyenv install 3.9.5 # download and compile python 3.8.9 pyenv install 3.8.9 # download and compile python 3.7.10 @@ -32,10 +32,10 @@ pyenv install 3.7.10 pyenv install 3.6.13 # download and compile python 2.7.18 pyenv install 2.7.18 # set "python", "python3", "python3.9" to point python3.9.5, # "python3.8" to point python3.8.9 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global 3.9.5 3.8.9 3.7.10 3.6.13 2.7.18 # reload .bashrc to run pyenv configurations again source $HOME/.bashrc for v in "3.9" "3.8" "3.7" "3.6" "2.7"; do \ @@ -114,8 +114,8 @@ fi Close the terminal and open again. ```bash # download and compile python 3.9.5 pyenv install 3.9.5 # download and compile python 3.8.9 pyenv install 3.8.9 # download and compile python 3.7.10 @@ -127,7 +127,7 @@ pyenv install 2.7.18 # set "python", "python3", "python3.9" to point python3.9.4, # "python3.8" to point python3.8.9 and "python2" and "python2.7" to point python2.7.18, and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global 3.9.5 3.8.9 3.7.10 3.6.13 2.7.18 for v in "3.9" "3.8" "3.7" "3.6" "2.7"; do \ python${v} -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; pyenv rehash; \ -
luzfcb revised this gist
Apr 17, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,7 @@ pyenv install 3.7.10 pyenv install 3.6.13 # download and compile python 2.7.18 pyenv install 2.7.18 # set "python", "python3", "python3.9" to point python3.9.4, # "python3.8" to point python3.8.9 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global 3.9.4 3.8.9 3.7.10 3.6.13 2.7.18 -
luzfcb revised this gist
Apr 13, 2021 . 1 changed file with 15 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,20 +22,20 @@ git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $HOME/.pyenv/plug if ! egrep -q "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; then echo -e "\n\nsetup pyenv configuration:\nThe following content was inserted at the end of the ${HOME}/.bashrc file\n"; echo -e '\n#### pyenv config\nif [ -f "$HOME/.pyenv/bin/pyenv" ] && ! type -P pyenv &>/dev/null ; then\n export PYTHON_CONFIGURE_OPTS="--enable-shared"\n export CFLAGS="-O2"\n export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M"\n export PATH="$HOME/.pyenv/bin:$PATH"\n eval "$(pyenv init -)"\n eval "$(pyenv virtualenv-init -)"\n if [[ ! "$(pyenv which python)" == "/usr/bin/python" ]] ; then \n pyenv virtualenvwrapper_lazy;\n fi\nfi\n#### pyenv config end' | tee --append "${HOME}/.bashrc"; source "$HOME/.bashrc"; else echo -e "\n\npyenv configuration already installed in $HOME/.bashrc"; fi # reload .bashrc to run pyenv configurations source $HOME/.bashrc # download and compile python 3.9.4 pyenv install 3.9.4 # download and compile python 3.8.9 pyenv install 3.8.9 # download and compile python 3.7.10 pyenv install 3.7.10 # download and compile python 3.6.13 pyenv install 3.6.13 # download and compile python 2.7.18 pyenv install 2.7.18 # set "python", "python3", "python3.9" to point python3.9.0, # "python3.8" to point python3.8.9 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global 3.9.4 3.8.9 3.7.10 3.6.13 2.7.18 # reload .bashrc to run pyenv configurations again source $HOME/.bashrc for v in "3.9" "3.8" "3.7" "3.6" "2.7"; do \ @@ -114,20 +114,20 @@ fi Close the terminal and open again. ```bash # download and compile python 3.9.4 pyenv install 3.9.4 # download and compile python 3.8.9 pyenv install 3.8.9 # download and compile python 3.7.10 pyenv install 3.7.10 # download and compile python 3.6.13 pyenv install 3.6.13 # download and compile python 2.7.18 pyenv install 2.7.18 # set "python", "python3", "python3.9" to point python3.9.4, # "python3.8" to point python3.8.9 and "python2" and "python2.7" to point python2.7.18, and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global 3.9.4 3.8.9 3.7.10 3.6.13 2.7.18 for v in "3.9" "3.8" "3.7" "3.6" "2.7"; do \ python${v} -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; pyenv rehash; \ -
luzfcb revised this gist
Apr 6, 2021 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -80,7 +80,12 @@ touch ${HOME}/.zprofile ``` ### Add pyenv load scripts on your shell Add to `${HOME}/.zprofile`, `${HOME}/.bash_profile`, `.bashrc` or `.zshrc` Note: In OSX Catalina and later versions, the default shell is `zsh` and not `bash` anymore, so the configuration file is `${HOME}/.zprofile` ```bash if command -v pyenv &>/dev/null; then -
luzfcb revised this gist
Mar 15, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ Tested only on Ubuntu 20.04, KDE Neon User Edition (based on Ubuntu 20.04) and OSX Mojave. will probably work on other newer versions, with no changes, or with few changes in non-python dependencies (`apt-get` packages) -
luzfcb revised this gist
Mar 15, 2021 . 1 changed file with 20 additions and 20 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,20 +22,20 @@ git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $HOME/.pyenv/plug if ! egrep -q "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; then echo -e "\n\nsetup pyenv configuration:\nThe following content was inserted at the end of the ${HOME}/.bashrc file\n"; echo -e '\n#### pyenv config\nif [ -f "$HOME/.pyenv/bin/pyenv" ] && ! type -P pyenv &>/dev/null ; then\n export PYTHON_CONFIGURE_OPTS="--enable-shared"\n export CFLAGS="-O2"\n export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M"\n export PATH="$HOME/.pyenv/bin:$PATH"\n eval "$(pyenv init -)"\n eval "$(pyenv virtualenv-init -)"\n if [[ ! "$(pyenv which python)" == "/usr/bin/python" ]] ; then \n pyenv virtualenvwrapper_lazy;\n fi\nfi\n#### pyenv config end' | tee --append "${HOME}/.bashrc"; source "$HOME/.bashrc"; else echo -e "\n\npyenv configuration already installed in $HOME/.bashrc"; fi # reload .bashrc to run pyenv configurations source $HOME/.bashrc # download and compile python 3.9.2 pyenv install 3.9.2 # download and compile python 3.8.8 pyenv install 3.8.8 # download and compile python 3.7.10 pyenv install 3.7.10 # download and compile python 3.6.13 pyenv install 3.6.13 # download and compile python 2.7.18 pyenv install 2.7.17 # set "python", "python3", "python3.9" to point python3.9.0, # "python3.8" to point python3.8.8 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global 3.9.2 3.8.8 3.7.10 3.6.13 2.7.18 # reload .bashrc to run pyenv configurations again source $HOME/.bashrc for v in "3.9" "3.8" "3.7" "3.6" "2.7"; do \ @@ -109,20 +109,20 @@ fi Close the terminal and open again. ```bash # download and compile python 3.9.2 pyenv install 3.9.2 # download and compile python 3.8.8 pyenv install 3.8.8 # download and compile python 3.7.10 pyenv install 3.7.10 # download and compile python 3.6.13 pyenv install 3.6.13 # download and compile python 2.7.18 pyenv install 2.7.17 # set "python", "python3", "python3.9" to point python3.9.0, # "python3.8" to point python3.8.8 and "python2" and "python2.7" to point python2.7.18, and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global 3.9.2 3.8.8 3.7.10 3.6.13 2.7.18 for v in "3.9" "3.8" "3.7" "3.6" "2.7"; do \ python${v} -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; pyenv rehash; \ -
luzfcb revised this gist
Dec 15, 2020 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -47,6 +47,13 @@ After install use the [virtualenvwrapper](#virtualenvwrapper-quick-tutorial) to ## OSX Install the `Xcode Command Line Tools` ```bash xcode-select --install ``` Install `brew` (https://brew.sh/) ```bash -
luzfcb revised this gist
Dec 15, 2020 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,8 @@ pyenv install 3.6.12 # download and compile python 2.7.18 pyenv install 2.7.17 # set "python", "python3", "python3.9" to point python3.9.0, # "python3.8" to point python3.8.6 and "python2" and "python2.7" to point python2.7.18 and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global 3.9.0 3.8.6 3.7.9 3.6.12 2.7.18 # reload .bashrc to run pyenv configurations again source $HOME/.bashrc @@ -113,6 +114,7 @@ pyenv install 3.6.12 pyenv install 2.7.17 # set "python", "python3", "python3.9" to point python3.9.0, # "python3.8" to point python3.8.6 and "python2" and "python2.7" to point python2.7.18, and etc # It is useful to have all pythons available globally because it makes it easier for example to use tox to test code against various versions of python pyenv global 3.9.0 3.8.6 3.7.9 3.6.12 2.7.18 for v in "3.9" "3.8" "3.7" "3.6" "2.7"; do \ -
luzfcb revised this gist
Dec 15, 2020 . 1 changed file with 29 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,16 +22,24 @@ git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $HOME/.pyenv/plug if ! egrep -q "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; then echo -e "\n\nsetup pyenv configuration:\nThe following content was inserted at the end of the ${HOME}/.bashrc file\n"; echo -e '\n#### pyenv config\nif [ -f "$HOME/.pyenv/bin/pyenv" ] && ! type -P pyenv &>/dev/null ; then\n export PYTHON_CONFIGURE_OPTS="--enable-shared"\n export CFLAGS="-O2"\n export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M"\n export PATH="$HOME/.pyenv/bin:$PATH"\n eval "$(pyenv init -)"\n eval "$(pyenv virtualenv-init -)"\n if [[ ! "$(pyenv which python)" == "/usr/bin/python" ]] ; then \n pyenv virtualenvwrapper_lazy;\n fi\nfi\n#### pyenv config end' | tee --append "${HOME}/.bashrc"; source "$HOME/.bashrc"; else echo -e "\n\npyenv configuration already installed in $HOME/.bashrc"; fi # reload .bashrc to run pyenv configurations source $HOME/.bashrc # download and compile python 3.9.0 pyenv install 3.9.0 # download and compile python 3.8.6 pyenv install 3.8.6 # download and compile python 3.7.9 pyenv install 3.7.9 # download and compile python 3.6.12 pyenv install 3.6.12 # download and compile python 2.7.18 pyenv install 2.7.17 # set "python", "python3", "python3.9" to point python3.9.0, # "python3.8" to point python3.8.6 and "python2" and "python2.7" to point python2.7.18 pyenv global 3.9.0 3.8.6 3.7.9 3.6.12 2.7.18 # reload .bashrc to run pyenv configurations again source $HOME/.bashrc for v in "3.9" "3.8" "3.7" "3.6" "2.7"; do \ python${v} -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; pyenv rehash; \ done ``` After install use the [virtualenvwrapper](#virtualenvwrapper-quick-tutorial) to create virtualenvs. @@ -93,15 +101,23 @@ fi Close the terminal and open again. ```bash # download and compile python 3.9.0 pyenv install 3.9.0 # download and compile python 3.8.6 pyenv install 3.8.6 # download and compile python 3.7.9 pyenv install 3.7.9 # download and compile python 3.6.12 pyenv install 3.6.12 # download and compile python 2.7.18 pyenv install 2.7.17 # set "python", "python3", "python3.9" to point python3.9.0, # "python3.8" to point python3.8.6 and "python2" and "python2.7" to point python2.7.18, and etc pyenv global 3.9.0 3.8.6 3.7.9 3.6.12 2.7.18 for v in "3.9" "3.8" "3.7" "3.6" "2.7"; do \ python${v} -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; pyenv rehash; \ done ``` -
luzfcb revised this gist
Dec 15, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ Tested only on Ubuntu 20.04 and KDE Neon User Edition (based on Ubuntu 20.04). will probably work on other newer versions, with no changes, or with few changes in non-python dependencies (`apt-get` packages) -
luzfcb revised this gist
Aug 16, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,6 +34,8 @@ python3 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U python2 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U ``` After install use the [virtualenvwrapper](#virtualenvwrapper-quick-tutorial) to create virtualenvs. ## OSX Install `brew` (https://brew.sh/) -
luzfcb revised this gist
Aug 14, 2020 . 1 changed file with 11 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,12 +22,12 @@ git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $HOME/.pyenv/plug if ! egrep -q "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; then echo -e "\n\nsetup pyenv configuration:\nThe following content was inserted at the end of the ${HOME}/.bashrc file\n"; echo -e '\n#### pyenv config\nif [ -f "$HOME/.pyenv/bin/pyenv" ] && ! type -P pyenv &>/dev/null ; then\n export PYTHON_CONFIGURE_OPTS="--enable-shared"\n export CFLAGS="-O2"\n export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M"\n export PATH="$HOME/.pyenv/bin:$PATH"\n eval "$(pyenv init -)"\n eval "$(pyenv virtualenv-init -)"\n if [[ ! "$(pyenv which python)" == "/usr/bin/python" ]] ; then \n pyenv virtualenvwrapper_lazy;\n fi\nfi\n#### pyenv config end' | tee --append "${HOME}/.bashrc"; source "$HOME/.bashrc"; else echo -e "\n\npyenv configuration already installed in $HOME/.bashrc"; fi # reload .bashrc to run pyenv configurations source $HOME/.bashrc # download and compile python 3.8.5 pyenv install 3.8.5 # download and compile python 2.7.18 pyenv install 2.7.17 # set "python", "python3", "python3.8" to point python3.8.5, and "python2" and "python2.7" to point python2.7.18 pyenv global 3.8.5 2.7.18 # reload .bashrc to run pyenv configurations again source $HOME/.bashrc python3 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U @@ -91,12 +91,12 @@ fi Close the terminal and open again. ```bash # download and compile python 3.8.5 pyenv install 3.8.5 # download and compile python 2.7.18 pyenv install 2.7.18 # set "python", "python3", "python3.8" to point python3.8.2, and "python2" and "python2.7" to point python2.7.18 pyenv global 3.8.5 2.7.18 python3 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U python2 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U -
luzfcb revised this gist
Jun 6, 2020 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,6 +42,7 @@ Install `brew` (https://brew.sh/) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" ``` Install the pyenv, pyenv-virtualenvwrapper and the most common python interpreter itself compile dependencies for OSX ```bash brew install pyenv pyenv-virtualenvwrapper aria2 openssl readline sqlite3 xz zlib -
luzfcb revised this gist
Jun 6, 2020 . 1 changed file with 0 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -165,11 +165,6 @@ mkvirtualenv -p python3.8 -a $(pwd) -r requirements.txt -r requirements2.txt mye - Create a virtualenv with python3.8, named it as the current directory, mark the current directory as the virtualenv linked Project Directory to automatically go to the Project Directory when activating it and python libraries from the requirements files. ```bash mkvirtualenv -p python3.8 -a $(pwd) -r requirements.txt $(basename $(pwd)) -
luzfcb revised this gist
Jun 6, 2020 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -126,6 +126,18 @@ deactivate workon myenv ``` TIP: type `workon` and press tab two times to autocomplete - Delete the virtualenv > it is necessary to deactivate virtualenv first ```bash rmvirtualenv myenv ``` - Create a virtualenv with python3.8, named it as `myenv2` and mark the current directory as the virtualenv linked Project Directory to automatically go to the Project Directory when activating it. ```bash -
luzfcb revised this gist
Jun 6, 2020 . 1 changed file with 95 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,20 +44,48 @@ Install `brew` (https://brew.sh/) ```bash brew install pyenv pyenv-virtualenvwrapper aria2 openssl readline sqlite3 xz zlib ``` On OSX Mojave: ``` touch ${HOME}/.bash_profile ``` On OSX Catalina: ``` touch ${HOME}/.zprofile ``` Add to `${HOME}/.zprofile`, `${HOME}/.bash_profile`, `.bashrc` or `.zshrc` ```bash if command -v pyenv &>/dev/null; then ZLIB_DIR="/usr/local/opt/zlib" OPEN_SSL_DIR="/usr/local/opt/[email protected]" READLINE_DIR="/usr/local/opt/readline" SQLITE3_DIR="/usr/local/opt/sqlite" export PATH="${OPEN_SSL_DIR}/bin:${SQLITE3_DIR}/bin:$PATH" export LDFLAGS="-L${OPEN_SSL_DIR}/lib -L${READLINE_DIR}/lib -L${SQLITE3_DIR}/lib -L${ZLIB_DIR}/lib ${LDFLAGS}" export CPPFLAGS="-I${OPEN_SSL_DIR}/include -I${READLINE_DIR}/include -I${SQLITE3_DIR}/include -I${ZLIB_DIR}/include ${CPPFLAGS}" export PKG_CONFIG_PATH="${OPEN_SSL_DIR}/lib/pkgconfig:${READLINE_DIR}/lib/pkgconfig:${SQLITE3_DIR}/lib/pkgconfig:${ZLIB_DIR}/lib/pkgconfig:${PKG_CONFIG_PATH}" export PYTHON_CONFIGURE_OPTS="--enable-shared" export CFLAGS="-O2" # Makes pyenv use aria2c to manage and accelerate the download of the python source code. # Useful to avoid problems on slower or unstable internet connection export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M" # load pyenv eval "$(pyenv init -)" if command -v pyenv-virtualenvwrapper &>/dev/null && echo $(pyenv which python) | grep -qv "/usr/bin"; then pyenv virtualenvwrapper fi fi ``` Close the terminal and open again. @@ -73,3 +101,64 @@ python3 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U python2 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U ``` Close the terminal and open again. ## Virtualenvwrapper quick tutorial - Create a virtualenv with python3.8 and named it as `myenv` and load the virtualenv ```bash mkvirtualenv -p python3.8 myenv ``` - Unload (deactivate) the virtualenv ```bash deactivate ``` - Load the virtualenv ```bash workon myenv ``` - Create a virtualenv with python3.8, named it as `myenv2` and mark the current directory as the virtualenv linked Project Directory to automatically go to the Project Directory when activating it. ```bash mkvirtualenv -p python3.8 -a $(pwd) myenv2 ``` - Create a virtualenv with python3.8, named it as `myenv3`, mark the current directory as the virtualenv linked Project Directory to automatically go to the Project Directory when activating it and install two python libraries ```bash mkvirtualenv -p python3.8 -a $(pwd) -i cookiecutter -i ipython myenv3 ``` - Create a virtualenv with python3.8, named it as `myenv4`, mark the current directory as the virtualenv linked Project Directory to automatically go to the Project Directory when activating it and python libraries from the requirements files. ```bash echo "cookiecutter>=1.7" > requirements.txt echo "ipython" > requirements2.txt ``` ```bash mkvirtualenv -p python3.8 -a $(pwd) -r requirements.txt -r requirements2.txt myenv4 ``` - Create a virtualenv with python3.8, named it as the current directory, mark the current directory as the virtualenv linked Project Directory to automatically go to the Project Directory when activating it and python libraries from the requirements files. ```bash echo "cookiecutter>=1.7" > requirements.txt echo "ipython" > requirements2.txt ``` ```bash mkvirtualenv -p python3.8 -a $(pwd) -r requirements.txt $(basename $(pwd)) ``` -
luzfcb revised this gist
Jun 5, 2020 . 1 changed file with 0 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,12 +36,6 @@ python2 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U ## OSX Install `brew` (https://brew.sh/) ```bash -
luzfcb revised this gist
Jun 5, 2020 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,8 +36,20 @@ python2 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U ## OSX Install Xcode Command Line Tools ```bash xcode-select --install ``` Install `brew` (https://brew.sh/) ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" ``` ```bash brew install pyenv brew install pyenv-virtualenvwrapper ``` -
luzfcb revised this gist
Jun 5, 2020 . 1 changed file with 35 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ will probably work on other newer versions, with no changes, or with few changes > NOTE: Don't create a .sh file and run it all at once. It will not work. Copy, paste, and execute each command below manually. :-) ## Ubuntu ```bash # DO NOT RUN THIS AS A ROOT USER @@ -32,3 +33,37 @@ source $HOME/.bashrc python3 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U python2 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U ``` ## OSX ``` brew install pyenv brew install pyenv-virtualenvwrapper ``` Add to `.bash_profile`, `.bashrc` or `.zshrc` ```bash if command -v pyenv &>/dev/null; then eval "$(pyenv init -)" fi if command -v pyenv-virtualenvwrapper &>/dev/null; then pyenv virtualenvwrapper fi ``` Close the terminal and open again. ```bash # download and compile python 3.8.2 pyenv install 3.8.2 # download and compile python 2.7.17 pyenv install 2.7.17 # set "python", "python3", "python3.8" to point python3.8.2, and "python2" and "python2.7" to point python2.7.17 pyenv global 3.8.2 2.7.17 python3 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U python2 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U ``` -
luzfcb revised this gist
May 27, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ sudo apt-get install aria2 build-essential curl git libbz2-dev libffi-dev liblzm curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash # install a virtualenvwrapper plugin to pyenv git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $HOME/.pyenv/plugins/pyenv-virtualenvwrapper # add pyenv required configurations on your .bashrc file if ! egrep -q "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; then echo -e "\n\nsetup pyenv configuration:\nThe following content was inserted at the end of the ${HOME}/.bashrc file\n"; echo -e '\n#### pyenv config\nif [ -f "$HOME/.pyenv/bin/pyenv" ] && ! type -P pyenv &>/dev/null ; then\n export PYTHON_CONFIGURE_OPTS="--enable-shared"\n export CFLAGS="-O2"\n export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M"\n export PATH="$HOME/.pyenv/bin:$PATH"\n eval "$(pyenv init -)"\n eval "$(pyenv virtualenv-init -)"\n if [[ ! "$(pyenv which python)" == "/usr/bin/python" ]] ; then \n pyenv virtualenvwrapper_lazy;\n fi\nfi\n#### pyenv config end' | tee --append "${HOME}/.bashrc"; source "$HOME/.bashrc"; else echo -e "\n\npyenv configuration already installed in $HOME/.bashrc"; fi # reload .bashrc to run pyenv configurations source $HOME/.bashrc -
luzfcb revised this gist
Mar 21, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ pyenv install 3.8.2 # download and compile python 2.7.17 pyenv install 2.7.17 # set "python", "python3", "python3.8" to point python3.8.2, and "python2" and "python2.7" to point python2.7.17 pyenv global 3.8.2 2.7.17 # reload .bashrc to run pyenv configurations again source $HOME/.bashrc python3 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U
NewerOlder