Project

General

Profile

DevelopersPython3Environment » History » Version 2

Dan Smith, 12/10/2022 05:35 AM

1 1 Dan Smith
# Python 3 Developer Environment Setup
2
3 2 Dan Smith
{{>toc}}
4
5 1 Dan Smith
## Windows
6
7
### Install Python
8
1. Download and install from [python.org](https://www.python.org/downloads/windows/). At the time of this writing, "Python 3.10.8" is recommended. During install note these options:
9
  1. Choose *Add python.exe to PATH*
10
  1. Choose *Disable path length limit*
11
1. In Windows settings, search "Manage app execution aliases" and:
12
  1. Disable *App Installer: python.exe*
13
  1. Disable *App Installer: python3.exe*
14
  1. Disable *App Installer: python3.7.exe*
15
1. Browse in explorer to `%AppData%\Local\Programs\Python\Python310` and copy `python.exe` to `python3.exe`
16
17
### Install Git
18
1. Download and install from [git-scm.org](https://git-scm.com/download/win). During installation take the defaults except for:
19
  1. Configuring the line ending conversions: choose *Checkout as-is, commit Unix-style line endings*
20
21
### Configure Git
22
From a command line:
23
1. `git config --global user.name "FIRST_NAME LAST_NAME"`
24
1. `git config --global user.email "MY_NAME@example.com"`
25
1. Optional, if you want to set an editor: `git config --global core.editor "PATH TO EDITOR"
26
      
27
28
### Clone the chirp git repository (py3 branch)
29
From a command line:
30
```
31
C:\Users\{user}\Documents> git clone https://github.com/kk7ds/chirp
32
C:\Users\{user}\Documents> cd chirp
33
C:\Users\{user}\Documents> git checkout origin/py3 -b py3
34
```
35
36
### Install the python dependencies
37
1. `python3 -mpip install -r requirements.txt`
38
1. `python3 -mpip install tox`
39
40
41
### Optional, but recommended: Install GitHub CLI
42
Via winget: `winget install --id GitHub.cli` or manually from [github.com](https://cli.github.com/)
43
44
Note: {user} as shown in paths above is the logged in Windows user
45
Note: The steps above were done on Windows 10 Pro, version 22H2
46 2 Dan Smith
47
## MacOS
48
49
### Install command-line tools
50
```shell
51
$ xcode-select --install
52
```
53
54
### Clone the chirp git repository
55
```shell
56
$ git clone https://github.com/kk7ds/chirp
57
$ cd chirp
58
```
59
60
### Install python requirements
61
```shell
62
$ python3 -mpip install -r requirements.txt
63
$ python3 -mpip install tox
64
```
65
66
### Run chirp
67
```shell
68
$ ./chirpwx.py
69
```
70
71
## Linux
72
73
These instructions are for Debian/Ubuntu, but should be generally applicable to other distros, possibly with different package names. You can use all distro packages (recommended), or install the python requirements with `pip install -r requirements.txt` but you probably want to get wxPython from distro packages.
74
75
### Install packages
76
77
```shell
78
$ sudo apt install git python3-wxgtk4.0 python3-serial python3-six python3-future python3-requests
79
```
80
81
### Clone the chirp git repository
82
```
83
$ git clone https://github.com/kk7ds/chirp
84
```
85
86
### Run chirp
87
```shell
88
$ cd chirp
89
$ ./chirpwx.py
90
```