Skip to content

Commit c1f15fb

Browse files
committed
Python dependency upgraded to version 3
node-gyp officially requires Python 3
1 parent 12e3153 commit c1f15fb

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

docs/contributing/setup-linux.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ You will need to install these tools on your machine:
44

55
- Node.js
66
- Yarn
7-
- Python 2
7+
- Python 3
88
- Electron dependencies
99

1010
## Node.js
@@ -32,10 +32,10 @@ If you're not familiar with `yarn`, please read [this document](./working-with-p
3232
to help familiarize yourself with how to do the common package tasks that are
3333
relevant to Desktop.
3434

35-
## Python 2
35+
## Python 3
3636

3737
Refer to your distributions package manager to obtain the latest version of the
38-
Python 2 series.
38+
Python 3 series.
3939

4040
## Electron dependencies
4141

docs/contributing/setup-macos.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ You will need to install these tools on your machine:
44

55
- Node.js
66
- Yarn
7-
- Python 2
7+
- Python 3
88
- Xcode and Xcode Command Line Tools (Xcode -> Preferences -> Downloads)
99

1010
## Node.js
@@ -70,10 +70,10 @@ relevant to Desktop.
7070
macOS comes with Python pre-installed, and it happens to be the right version, so you're probably fine! But let's be sure. Open a terminal and run this command inside the Desktop source directory:
7171

7272
```shellsession
73-
$ python --version
73+
$ python3 --version
7474
```
7575

76-
If you see the output `Python 2.7.x`, you're good to go!
76+
If you see the output `Python 3.9.x`, you're good to go!
7777

7878
### I need to use different versions of Python in different projects!
7979

@@ -87,13 +87,13 @@ For this, we recommend [pyenv](https://github.com/pyenv/pyenv). (It's the only g
8787
pyenv install
8888
```
8989

90-
3. Verify you have the right version by running `python --version` again:
90+
3. Verify you have the right version by running `python3 --version` again:
9191

9292
```shellsession
93-
$ python --version
93+
$ python3 --version
9494
```
9595

96-
If you see the output `Python 2.7.x`, you're good to go!
96+
If you see the output `Python 3.9.x`, you're good to go!
9797

9898
## Xcode Command Line Tools
9999

docs/contributing/setup-windows.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ You will need to install these tools on your machine:
44

55
- Node.js
66
- Yarn
7-
- Python 2
7+
- Python 3
88
- Visual C++ Build Tools
99

1010
## Node.js
@@ -74,16 +74,19 @@ Open a shell and run this command:
7474
$ python --version
7575
```
7676

77-
If you see the output `Python 2.7.x`, you're good to go!
77+
If you see the output `Python 3.9.x`, you're good to go!
7878

7979
If you see an error about being unable to find `python`, that probably means you
80-
don't have Python installed. You can install Python 2.7 from the
80+
don't have Python installed. You can install Python 3.9 from the
8181
[Python website](https://www.python.org/downloads/windows/).
8282

8383
**Python installation notes:**
8484

85-
- Let Python install into the default suggested path (`c:\Python27`), otherwise
85+
- Let Python install into the default suggested path (`c:\Python39`), otherwise
8686
you'll have to configure `node-gyp` manually to look at a different path.
87+
- In the case you already have or need to have Python on a different path, set the `PYTHON` environment variable or the npm's `python` config key to your Python's executable path:
88+
89+
npm config set python "c:\path\to\python3\python.exe"
8790
- Ensure the **Add python.exe to Path** option is selected.
8891

8992
## Visual C++ Build Tools

0 commit comments

Comments
 (0)