From 73757ead8f455d03a61d131a55ba01da8841d00e Mon Sep 17 00:00:00 2001 From: Josh Quintal Date: Wed, 14 Dec 2022 18:41:38 -0600 Subject: [PATCH 1/5] Fill MacOS node-gyp troubleshooting guide --- CONTRIBUTING.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be8d6cb22d..f5c2087322 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,14 @@ If installation fails due to a `node-gyp` issue you may need to perform some add ### on macOS -- I have no idea. +- Determine if you have Xcode command line tools installed + - example the console will tell you if they're already installed): `xcode-select --install` +- Determine if you have Python 2.7 installed + - example: `which python2.7` +- If you do not have Python 2.7 installed, you need to install it. We recommend `pyenv` for this so you can keep the default MacOS python installation untouched. + 1. [Install `pyenv`](https://github.com/pyenv/pyenv#homebrew-in-macos) + 2. [Setup your shell environment for `pyenv`](https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv) + 3. Install Python 2.x: `pyenv install 2.7.18` ## Clean install From ed04de67172c889e5dd1840137f29bf9a251f68e Mon Sep 17 00:00:00 2001 From: Josh Quintal Date: Thu, 15 Dec 2022 15:40:27 -0600 Subject: [PATCH 2/5] Add final xcode-select reinstall measure --- CONTRIBUTING.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5c2087322..40d8d1d4d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,14 +31,17 @@ If installation fails due to a `node-gyp` issue you may need to perform some add ### on macOS -- Determine if you have Xcode command line tools installed - - example the console will tell you if they're already installed): `xcode-select --install` -- Determine if you have Python 2.7 installed - - example: `which python2.7` -- If you do not have Python 2.7 installed, you need to install it. We recommend `pyenv` for this so you can keep the default MacOS python installation untouched. +- Attempt to install Xcode command line tools (the console will tell you if they're already installed) + - example: `xcode-select --install` +- Determine if you have Python 2.x installed + - example: `which python` +- If you do not have Python 2.x installed, you need to install it. We recommend `pyenv` for this so you can keep the default MacOS python installation untouched. 1. [Install `pyenv`](https://github.com/pyenv/pyenv#homebrew-in-macos) 2. [Setup your shell environment for `pyenv`](https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv) 3. Install Python 2.x: `pyenv install 2.7.18` +- If the above steps don't fix the `node-gyp` issue and you've recently updated your OS, you may need to re-install Xcode command line tools: + 1. Remove the existing, broken installation: `rm -rf /Library/Developer/CommandLineTools` + 2. Install them again: `xcode-select --install` ## Clean install From 38f619cc5b923bad02c816e7df9b1d9c921e3628 Mon Sep 17 00:00:00 2001 From: David Murdoch <187813+davidmurdoch@users.noreply.github.com> Date: Tue, 31 Jan 2023 16:37:51 -0500 Subject: [PATCH 3/5] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 40d8d1d4d3..27d46ff6cb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,7 +35,7 @@ If installation fails due to a `node-gyp` issue you may need to perform some add - example: `xcode-select --install` - Determine if you have Python 2.x installed - example: `which python` -- If you do not have Python 2.x installed, you need to install it. We recommend `pyenv` for this so you can keep the default MacOS python installation untouched. +- If you do not have Python 2.x installed, you need to install it. We recommend `pyenv` for this so you can keep the default macOS Python installation untouched. 1. [Install `pyenv`](https://github.com/pyenv/pyenv#homebrew-in-macos) 2. [Setup your shell environment for `pyenv`](https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv) 3. Install Python 2.x: `pyenv install 2.7.18` From df907ffcd809c2ffef3a0efa7dfc0e1347a7753f Mon Sep 17 00:00:00 2001 From: Jeff Smale <6363749+jeffsmale90@users.noreply.github.com> Date: Wed, 21 Jun 2023 10:15:03 +1200 Subject: [PATCH 4/5] Update python installation instructions --- CONTRIBUTING.md | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 27d46ff6cb..9fd626acda 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,29 +16,36 @@ If installation fails due to a `node-gyp` issue you may need to perform some additional system configuration. -### on Linux (Ubuntu-based) +Ganache uses [node-gyp v7.1.2](https://github.com/nodejs/node-gyp/tree/v7.1.2) as part of it's build system, which requires Python v2.7, v3.5, v3.6, v3.7, or v3.8 to be installed on the system. -- Determine if you have Python 2.7 installed - - example: `which python2.7` -- If you do not have Python 2.7 installed, you need to install it - - example: `sudo apt update && sudo apt install python2.7` -- Finally, run `npm config set python python2.7` +In order to debug issues with Python, follow the instructions for your operating system below: ### on Windows - Install [https://www.npmjs.com/package/windows-build-tools](Windows-Build-Tools) - `npm install --global windows-build-tools` +### on Linux (Ubuntu-based) + +- Determine whether you have a compatible version of Python installed: + - example: `python --version` (and `python3 --version` if `python3` is installed) +- If you do not have a compatible version installed: (v2.7, v3.5, v3.6, v3.7, or v3.8), you will need to install it: + - example: `sudo apt update && sudo apt install python2.7` +- You may need to configure the python dependency (see [node-gyp for details on different ways to do this](https://github.com/nodejs/node-gyp/tree/v7.1.2#configuring-python-dependency)): + - example: `npm config set python ` + ### on macOS - Attempt to install Xcode command line tools (the console will tell you if they're already installed) - example: `xcode-select --install` -- Determine if you have Python 2.x installed - - example: `which python` -- If you do not have Python 2.x installed, you need to install it. We recommend `pyenv` for this so you can keep the default macOS Python installation untouched. +- Determine whether you have a compatible version of Python installed: + - example: `python --version` (and `python3 --version` if `python3` is installed) +- If you do not have a compatible version installed: (v2.7, v3.5, v3.6, v3.7, or v3.8), you will need to install it: (we recommend [pyenv](https://github.com/pyenv/pyenv) to manage your python installation) 1. [Install `pyenv`](https://github.com/pyenv/pyenv#homebrew-in-macos) 2. [Setup your shell environment for `pyenv`](https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv) - 3. Install Python 2.x: `pyenv install 2.7.18` + 3. Install Python: `pyenv install 2.7` + 4. You may need to configure the python dependency (see [node-gyp for details on different ways to do this](https://github.com/nodejs/node-gyp/tree/v7.1.2#configuring-python-dependency)): + - example: `npm config set python ` - If the above steps don't fix the `node-gyp` issue and you've recently updated your OS, you may need to re-install Xcode command line tools: 1. Remove the existing, broken installation: `rm -rf /Library/Developer/CommandLineTools` 2. Install them again: `xcode-select --install` From 16a6b5259bf578bc64821c2f1787f62d43da4508 Mon Sep 17 00:00:00 2001 From: jeffsmale90 <6363749+jeffsmale90@users.noreply.github.com> Date: Thu, 22 Jun 2023 06:13:49 +1200 Subject: [PATCH 5/5] Update CONTRIBUTING.md Co-authored-by: David Murdoch <187813+davidmurdoch@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9fd626acda..8a86500140 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ If installation fails due to a `node-gyp` issue you may need to perform some additional system configuration. -Ganache uses [node-gyp v7.1.2](https://github.com/nodejs/node-gyp/tree/v7.1.2) as part of it's build system, which requires Python v2.7, v3.5, v3.6, v3.7, or v3.8 to be installed on the system. +Ganache uses [node-gyp v7.1.2](https://github.com/nodejs/node-gyp/tree/v7.1.2) as part of its build system, which requires Python v2.7, v3.5, v3.6, v3.7, or v3.8 to be installed on the system. In order to debug issues with Python, follow the instructions for your operating system below: