Last active
April 18, 2025 22:04
-
-
Save luzfcb/1a7f64adf5d12c2d357d0b4319fe9dcd to your computer and use it in GitHub Desktop.
Revisions
-
luzfcb revised this gist
Oct 29, 2024 . 1 changed file with 18 additions and 18 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 @@ -1,4 +1,4 @@ Tested only on Ubuntu 24.04, KDE Neon User Edition (based on Ubuntu 24.04) and OSX Mojave or higher. will probably work on other newer versions, with no changes, or with few changes in non-python dependencies (`apt-get` packages) @@ -30,7 +30,7 @@ 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.13.0 3.12.7 3.11.10 3.10.15 3.9.20 3.8.20 3.7.17 3.6.15 2.7.18" # I created this documentation for my own use, as I maintain certain # libraries that require test the backward compatibility. @@ -41,15 +41,15 @@ python_versions="3.12.3 3.11.9 3.10.13 3.9.19 3.8.19 3.7.17 3.6.15 2.7.18" # to activate the installation of additional versions. # https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global-advanced # simple use: # python_versions="3.13.0" 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.13" to point python3.13.0, # "python3.9" to point python3.9.20 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} @@ -137,14 +137,14 @@ Close the terminal and open again. ```bash # install the python versions listed on python_versions variable python_versions="3.13.0 3.12.7 3.11.10 3.10.15 3.9.20 3.8.20 3.7.17 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.13" to point python3.13.0, # "python3.9" to point python3.9.20 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} @@ -165,10 +165,10 @@ Close the terminal and open again. ## Virtualenvwrapper quick tutorial - Create a virtualenv with python3.13 and named it as `myenv` and load the virtualenv ```bash mkvirtualenv -p python3.13 myenv ``` - Unload (deactivate) the virtualenv @@ -195,19 +195,19 @@ rmvirtualenv myenv - Create a virtualenv with python3.13, 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.13 -a $(pwd) myenv2 ``` - Create a virtualenv with python3.13, 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.13 -a $(pwd) -i cookiecutter -i ipython myenv3 ``` - Create a virtualenv with python3.13, 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 @@ -216,13 +216,13 @@ echo "ipython" > requirements2.txt ```bash mkvirtualenv -p python3.13 -a $(pwd) -r requirements.txt -r requirements2.txt myenv4 ``` - Create a virtualenv with python3.13, 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.13 -a $(pwd) -r requirements.txt $(basename $(pwd)) ``` -
luzfcb revised this gist
May 2, 2024 . 1 changed file with 4 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 @@ -59,7 +59,8 @@ source "${HOME}/.bashrc" # upgrade some basic packages and install virtualenv virtualenvwrapper # on all python versions for version in ${python_versions}; do \ version="${version:0:4}"; \ python"${version%\.}" -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; \ done ``` @@ -151,7 +152,8 @@ pyenv global ${python_versions} # upgrade some basic packages and install virtualenv virtualenvwrapper # on all python versions for version in ${python_versions}; do \ version="${version:0:4}"; \ python"${version%\.}" -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U; \ done ``` -
luzfcb revised this gist
Apr 24, 2024 . 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 @@ -2,7 +2,7 @@ Tested only on Ubuntu 22.04, KDE Neon User Edition (based on Ubuntu 22.04) and O will probably work on other newer versions, with no changes, or with few changes in non-python dependencies (`apt-get` packages) > NOTE: Don't create a .sh file and run it all at once. It may will not work. Copy, paste, and execute each command below manually. :-) ## Ubuntu -
luzfcb revised this gist
Apr 24, 2024 . 1 changed file with 18 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,26 @@ 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.12.3 3.11.9 3.10.13 3.9.19 3.8.19 3.7.17 3.6.15 2.7.18" # I created this documentation for my own use, as I maintain certain # libraries that require test the backward compatibility. # Therefore, I decided to install every possible version I may need, # regardless of the time required to download, compile, and install them. # I suggest installing only the latest stable version. You can install other # versions later, but remember to use `pyenv global <version1> <version2>` # to activate the installation of additional versions. # https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global-advanced # simple use: # python_versions="3.12.3" 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.12" to point python3.12.3, # "python3.9" to point python3.9.19 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 +136,14 @@ Close the terminal and open again. ```bash # install the python versions listed on python_versions variable python_versions="3.12.3 3.11.9 3.10.13 3.9.19 3.8.19 3.7.17 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.12" to point python3.12.3, # "python3.9" to point python3.9.19 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 7, 2024 . 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 @@ -1,4 +1,4 @@ Tested only on Ubuntu 22.04, KDE Neon User Edition (based on Ubuntu 22.04) and OSX Mojave or higher. will probably work on other newer versions, with no changes, or with few changes in non-python dependencies (`apt-get` packages) @@ -82,7 +82,7 @@ touch ${HOME}/.bash_profile ``` On OSX Catalina or higher: ``` touch ${HOME}/.zprofile -
luzfcb revised this gist
Mar 7, 2024 . 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.12.2 3.11.8 3.10.13 3.9.18 3.8.18 3.7.17 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.12" to point python3.12.2, # "python3.9" to point python3.9.18 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,13 +124,13 @@ Close the terminal and open again. ```bash # install the python versions listed on python_versions variable python_versions="3.12.2 3.11.8 3.10.13 3.9.18 3.8.18 3.7.17 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.12" to point python3.12.2, # "python3.9" to point python3.9.18 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
Dec 5, 2023 . 1 changed file with 17 additions and 17 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 @@ -1,4 +1,4 @@ Tested only on Ubuntu 22.04, KDE Neon User Edition (based on Ubuntu 22.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) @@ -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.12.0 3.11.6 3.10.13 3.9.18 3.8.18 3.7.17 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.12" to point python3.12.0, # "python3.9" to point python3.9.18 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.12.0 3.11.6 3.10.13 3.9.18 3.8.18 3.7.17 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.12" to point python3.12.0, # "python3.9" to point python3.9.18 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} @@ -151,10 +151,10 @@ Close the terminal and open again. ## Virtualenvwrapper quick tutorial - Create a virtualenv with python3.12 and named it as `myenv` and load the virtualenv ```bash mkvirtualenv -p python3.12 myenv ``` - Unload (deactivate) the virtualenv @@ -181,19 +181,19 @@ rmvirtualenv myenv - Create a virtualenv with python3.12, 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.12 -a $(pwd) myenv2 ``` - Create a virtualenv with python3.12, 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.12 -a $(pwd) -i cookiecutter -i ipython myenv3 ``` - Create a virtualenv with python3.12, 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 @@ -202,13 +202,13 @@ echo "ipython" > requirements2.txt ```bash mkvirtualenv -p python3.12 -a $(pwd) -r requirements.txt -r requirements2.txt myenv4 ``` - Create a virtualenv with python3.12, 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.12 -a $(pwd) -r requirements.txt $(basename $(pwd)) ``` -
luzfcb revised this gist
Mar 21, 2023 . 1 changed file with 16 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 @@ -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.11.2 3.10.10 3.9.16 3.8.16 3.7.16 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.11" to point python3.11.2, # "python3.9" to point python3.9.16 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.11.2 3.10.10 3.9.16 3.8.16 3.7.16 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.11" to point python3.11.2, # "python3.9" to point python3.9.16 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} @@ -151,10 +151,10 @@ Close the terminal and open again. ## Virtualenvwrapper quick tutorial - Create a virtualenv with python3.11 and named it as `myenv` and load the virtualenv ```bash mkvirtualenv -p python3.11 myenv ``` - Unload (deactivate) the virtualenv @@ -181,19 +181,19 @@ rmvirtualenv myenv - Create a virtualenv with python3.11, 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.11 -a $(pwd) myenv2 ``` - Create a virtualenv with python3.11, 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.11 -a $(pwd) -i cookiecutter -i ipython myenv3 ``` - Create a virtualenv with python3.11, 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 @@ -202,13 +202,13 @@ echo "ipython" > requirements2.txt ```bash mkvirtualenv -p python3.11 -a $(pwd) -r requirements.txt -r requirements2.txt myenv4 ``` - Create a virtualenv with python3.11, 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.11 -a $(pwd) -r requirements.txt $(basename $(pwd)) ``` -
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
NewerOlder