-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy pathmacos.html
114 lines (114 loc) · 7.76 KB
/
macos.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>PyRadio pipx installation on MacOS</title>
<style>
body {padding: 2em;}
@media screen and (max-width: 770px) {
body {padding: 10px;}
}
body {max-width: 750px; margin: auto;}
h2 {margin-top: 2.5em; border-bottom:1px solid SaddleBrown; color: SaddleBrown;}
h3 {margin-top: 2em; color: SaddleBrown; text-decoration: underline SaddleBrown}
h4 {margin: 2em 0 1em 0; color: SaddleBrown; font-size: 1em;}
h4:before {content: "# "; font-weight: bold; vertical-align: middle;}
h5 {margin: 2em 0 1em 0; color: SaddleBrown; font-size: 1em;;}
h5:before {content: "## "; font-weight: bold; vertical-align: middle;}
p, table, ol, ul {margin-left: .8em;}
STRONG {color: SaddleBrown;}
dl {margin: 2em;}
dd {margin: 1em;}
dt {font-weight: bold;}
TABLE {border: 1px solid SaddleBrown; border-collapse: collapse; margin-left: auto; margin-right: auto; border-radius: 5px; -moz-border-radius: 5px; border-collapse:separate; box-shadow: 5px 5px 15px #888888;}
TH {text-align: left; vertical-align: top; padding: 5px;color: SaddleBrown;border: 1px solid SaddleBrown; background-color: SaddleBrown; color: white;}
TD {text-align: left; vertical-align: top; padding: 5px 10px;border: 1px solid SaddleBrown;}
pre { background-color: rgba(245, 245, 245, 1); color: #474747; padding: 1.5em; border: 1px solid #C7C7C7; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; overflow: auto; box-shadow: 5px 5px 15px #C7C7C7;}
.task-list {list-style-type: none; padding: 0; margin: 0 0 0 1em ;}
img{display: block; margin-left: auto; margin-right: auto; max-width: 750px; width: 100%; background:transparent; padding:3px; border:1px solid #999999; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; box-shadow:5px 5px 15px #888888;}
.indented {text-indent: -1.5em; padding-left: 1.5em; margin-left: 1em;}
a{ color: SaddleBrown;}
a:visited{color: SaddleBrown;}
</style>
</head>
<body>
<header id="title-block-header">
</header>
<h1 style="color: SaddleBrown" id="pyradio-macos-installation">PyRadio macOS installation</h1>
<h2 id="table-of-contents">Table of Contents <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
<!-- vim-markdown-toc Marked -->
<ul>
<li><a href="#preface">Preface</a></li>
<li><a href="#preparation">Preparation</a>
<ul>
<li><a href="#homebrew-installation">Homebrew installation</a></li>
<li><a href="#python-installation">Python Installation</a></li>
<li><a href="#media-player-installation">Media player installation</a></li>
<li><a href="#get-the-installation-script">Get the installation script</a></li>
</ul></li>
<li><a href="#pyradio-installation">PyRadio installation</a>
<ul>
<li><a href="#dependencies-installation">Dependencies installation</a></li>
<li><a href="#performing-the-installation">Performing the installation</a></li>
</ul></li>
</ul>
<!-- vim-markdown-toc -->
<p class="indented">[ <a href="build.html#installation-guides">Return to PyRadio Build Instructions</a> ]</p>
<h2 id="preface">Preface <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
<p><strong>PyRadio</strong> on macOS can only be installed on <strong>Python 3</strong> through <strong>pipx</strong>.</p>
<p>Furtermore, the pipx installation will be a fully isolated one, which means that all dependencies will be installed along with <strong>PyRadio</strong> in a virtual environment.</p>
<p>That is a one-way street to follow since the combination of macOS versions, python installation methods and player installation methods is too complex to provide a complete installation guide for <strong>PyRadio</strong>.</p>
<p><a target="_blank" href="https://pypa.github.io/pipx/">pipx</a> provides a standardization of the whole procedure which leads to an acceptable (enjoyable even) user experience.</p>
<h2 id="preparation">Preparation <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
<p>These are the steps required before actually installing <strong>PyRadio</strong>.</p>
<p style="margin: 1.5em 4em 0 4em; text-indent: -2.5em;"><strong>Note:</strong> The following installation instructions were performed on a freshly installed <strong>Ventura</strong> (macOS 13) system. Things may be a bit different for older macOs versions, but it will be the same for <strong>Sonoma</strong> (macOS 14).</p>
<h3 id="homebrew-installation">Homebrew installation</h3>
<p>This is the method <a target="_blank" href="https://brew.sh">Homebrew</a> recommends, so we just go with it.</p>
<p>Open a terminal and execute:</p>
<!-- START OF BREW LINK -->
<pre>/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"</pre>
<!-- END OF BREW LINK -->
<h3 id="python-installation">Python Installation</h3>
<p>Your system comes with a pre-installed version of Python, but it would be better to install the one provided by <strong>Homebrew</strong>.</p>
<pre>brew install python3</pre>
<p>This will also install “<em>Apple’s Command Line Developer Tools</em>” (if they are not already installed).</p>
<p>Then, adjust your <strong>PATH</strong>, so that the newly installed Python will be the default one.</p>
<pre>cat << END >> ~/.zshrc
export PATH=/usr/local/bin:"$PATH"
END
source ~/.zshrc</pre>
<h3 id="media-player-installation">Media player installation</h3>
<p>The next step is to install a supported media player (<strong>MPV</strong>, <strong>MPLayer</strong> or <strong>VLC</strong>). You are free to install any one of them or even more than one. The steps to follow from now on depends entirely on you, meaning depends entirely on the media player(s) you want to install and use with <strong>PyRadio</strong>.</p>
<p><strong>1. VLC</strong></p>
<p><strong>VLC</strong> provides a macOS package, so you can just go get it from <a target="_blank" href="https://www.videolan.org/vlc/">its site</a>. This is the cleaner way and I would recommend it.</p>
<p>If this is the player you prefer, you will have to take one more step before it can be used with <strong>PyRadio</strong>.</p>
<p>Open a terminal and type:</p>
<pre>ln -s /Applications/VLC.app/Contents/MacOS/VLC ~/.local/bin/cvlc</pre>
<p><strong>2. MPV or MPlayer</strong></p>
<p><strong>MPV</strong> and <strong>MPlayer</strong> can be installed using <a target="_blank" href="https://brew.sh">Homebrew</a>.</p>
<p><strong><em>a) MPV</em></strong></p>
<pre>brew install mpv</pre>
<p><strong><em>b) MPlayer</em></strong></p>
<pre>brew install mplayer</pre>
<h3 id="get-the-installation-script">Get the installation script</h3>
<p>Open a terminal and execute:</p>
<pre>cd
curl -L \
https://raw.githubusercontent.com/coderholic/pyradio/master/pyradio/install.py \
-o install.py</pre>
<h2 id="pyradio-installation">PyRadio installation <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
<p>Your system is ready now for <strong>PyRadio</strong> to be installed.</p>
<h3 id="dependencies-installation">Dependencies installation</h3>
<p>Open a terminal and type:</p>
<pre>python3 -m pip install requests rich pipx --break-system-packages</pre>
<p>Finally, type:</p>
<pre>python3 -m pipx ensurepath
source ~/.zshrc</pre>
<h3 id="performing-the-installation">Performing the installation</h3>
<p>Execute the following command:</p>
<pre>python3 install.py</pre>
<p>Enjoy!</p>
</body>
</html>