

- #INSTALL PYTHON ON MAC BREW OR WEBSITE HOW TO#
- #INSTALL PYTHON ON MAC BREW OR WEBSITE MAC OS#
- #INSTALL PYTHON ON MAC BREW OR WEBSITE INSTALL#
- #INSTALL PYTHON ON MAC BREW OR WEBSITE UPDATE#
- #INSTALL PYTHON ON MAC BREW OR WEBSITE UPGRADE#
Note: you may need to create a new shell or reload your bash_profile in your current shell for the pyenv initialization to do its thing (set up shims).
#INSTALL PYTHON ON MAC BREW OR WEBSITE INSTALL#
Now install some python using pyenv and then switch to it with the pyenv local command (you can see all your versions with pyenv versions).

If command -v pyenv 1>/dev/null 2>&1 then
#INSTALL PYTHON ON MAC BREW OR WEBSITE UPDATE#
#INSTALL PYTHON ON MAC BREW OR WEBSITE HOW TO#
The pyenv repo is pretty detailed on how to install for different systems and what it's actually doing, but here's the basic steps for mac: Modify your shell environment ( PATH) with shims so that when you do pyenv local 3.8.1, calling python will invoke the new interpreter instead of your system python.Doing pyenv install 3.8.1 will install python 3.8.1 under ~/.pyenv/versions/3.8.1. Install different python versions under some directory.The downside to this approach is that you won’t get automatic updates. Essentially, pyenv can do two key things for you: Once you are up and running with homebrew, installing Python on MacOS is as easy as: brew install python Official installer Alternatively, you can download an installer from the Python download website. The gif below displays an update of the documentation, when you push changes to your GitHub project.I recommend using pyenv to manage your local python versions (both 2.x and 3.x) instead of installing new versions directly with homebrew or building new python versions from source manually. But I would say: “If you do it, your’e aware of it 😉 “ Step 5: Enable the GitHub pages on your project and select the branch gh-pages as source for your documentation Note: That’s not necessary as the mkdocs gh-deploy command in the GitHub action will create the branch, if it’s not there. run: mkdocs gh-deploy -force Step 4: Create a new branch in your GitHub project called gh-pages github/workflows/ci.yml and insert the GitHub CI configuration which is listed here name: ci Mkdir workflows Step 3: Create a file called. gitignore Step 2: Create two folders in your GitHub project folder mkdir. INFO - Start detecting changes Step 2: Build the pages in the folder “/site”, which will be added to your GitHub project python3 -m mkdocs build Integrate the documentation with GitHub CI Step 1: Add folder to. If there is no NodeJS installed on your system, you can skip this step. If you have already installed NodeJS earlier, then open terminal and run the following commands to uninstall them first. INFO - Documentation built in 0.57 seconds Here are the steps to install NVM on Mac with Homebrew.

pymdownx.tilde Step 1: Preview your documentation locally python3 -m mkdocs serve Repo_url: /Įdit_uri: edit/master/Įmoji_index: !!python/name:Įmoji_generator: !!python/name:_svgįormat: !!python/name:_code_format Here is an example configuration for the mkdocs.yml file and here you find an example project, which is based on that configuration.
#INSTALL PYTHON ON MAC BREW OR WEBSITE UPGRADE#
MkDocs installation on Mac Step 1: Verify the brew installation brew -version Step 2: Change the folder permission to install python, if needed sudo chown -R $(whoami) /usr/local/lib/pkgconfigĬhmod u+w /usr/local/lib/pkgconfig Step 3: Install python3 brew install python3 Step 4: Upgrade pip pip3 install -upgrade pip Step 5: Install mkdocs pip3 install mkdocs Step 6: Install mkdocs-material pip3 install mkdocs-material Step 7: Install mkdocs-material-extensions pip3 install mkdocs-material-extensions Verify and build your documentation Step 1: Ensure you have the mkdocs.yml file in place
#INSTALL PYTHON ON MAC BREW OR WEBSITE MAC OS#
The gif shows the example project documentation: Local setup on Mac OS Here an example GitHub project, which is based on the setup I documented in this blog post: Steve Martinelli created an awesome blog post in that context called 5 Features I Like About Material for MkDoc. The blog post is for me a little cheat sheet and maybe it is also useful for you. I won’t covering details about the background. This blog post contains the simplified steps, how to setup MkDocs for a GitHub project to use it with GitHub Pages.
