Python dependency upgraded to version 3

node-gyp officially requires Python 3
This commit is contained in:
David Ferenczy Rogožan 2021-05-13 04:01:43 +02:00
parent 12e315303e
commit c1f15fb395
3 changed files with 16 additions and 13 deletions

View file

@ -4,7 +4,7 @@ You will need to install these tools on your machine:
- Node.js
- Yarn
- Python 2
- Python 3
- Electron dependencies
## Node.js
@ -32,10 +32,10 @@ If you're not familiar with `yarn`, please read [this document](./working-with-p
to help familiarize yourself with how to do the common package tasks that are
relevant to Desktop.
## Python 2
## Python 3
Refer to your distributions package manager to obtain the latest version of the
Python 2 series.
Python 3 series.
## Electron dependencies

View file

@ -4,7 +4,7 @@ You will need to install these tools on your machine:
- Node.js
- Yarn
- Python 2
- Python 3
- Xcode and Xcode Command Line Tools (Xcode -> Preferences -> Downloads)
## Node.js
@ -70,10 +70,10 @@ relevant to Desktop.
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:
```shellsession
$ python --version
$ python3 --version
```
If you see the output `Python 2.7.x`, you're good to go!
If you see the output `Python 3.9.x`, you're good to go!
### I need to use different versions of Python in different projects!
@ -87,13 +87,13 @@ For this, we recommend [pyenv](https://github.com/pyenv/pyenv). (It's the only g
pyenv install
```
3. Verify you have the right version by running `python --version` again:
3. Verify you have the right version by running `python3 --version` again:
```shellsession
$ python --version
$ python3 --version
```
If you see the output `Python 2.7.x`, you're good to go!
If you see the output `Python 3.9.x`, you're good to go!
## Xcode Command Line Tools

View file

@ -4,7 +4,7 @@ You will need to install these tools on your machine:
- Node.js
- Yarn
- Python 2
- Python 3
- Visual C++ Build Tools
## Node.js
@ -74,16 +74,19 @@ Open a shell and run this command:
$ python --version
```
If you see the output `Python 2.7.x`, you're good to go!
If you see the output `Python 3.9.x`, you're good to go!
If you see an error about being unable to find `python`, that probably means you
don't have Python installed. You can install Python 2.7 from the
don't have Python installed. You can install Python 3.9 from the
[Python website](https://www.python.org/downloads/windows/).
**Python installation notes:**
- Let Python install into the default suggested path (`c:\Python27`), otherwise
- Let Python install into the default suggested path (`c:\Python39`), otherwise
you'll have to configure `node-gyp` manually to look at a different path.
- 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:
npm config set python "c:\path\to\python3\python.exe"
- Ensure the **Add python.exe to Path** option is selected.
## Visual C++ Build Tools