Changes

Jump to: navigation, search

Orange Pi Zero 3

248 bytes added, 15:57, 11 July 2023
Python to replace the pip source method
=== Python to replace the pip source method ===
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''The Linux system PIP's default source is the official source of Python, but the source of the official Python official visits is very slow, and the Python software packaging failure is often caused by network reasons. So when installing the Python library with PIP, remember to replace the pip source'''</big>|}
<ol style="list-style-type: decimal;">
<li><p>First install '''python3-pip'''</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''sudo apt-get update'''</p>
<p>orangepi@orangepi:~$ '''sudo apt-get install -y python3-pip'''</p>|}</li>
<li><p>Method of permanent replacement of pip source under Linux</p>
<ol style="list-style-type: lower-alpha;">
<li><p>Create a new'''~/.pip''' directory first, then add the &gt; '''pip.conf''' configuration file, and set the source of the pip &gt; as Tsinghua source</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''mkdir -p ~/.pip'''</p>
<p>orangepi@orangepi:~$ '''cat &lt;&lt;EOF &gt; ~/.pip/pip.conf'''</p>
<p>'''index-url = https://pypi.tuna.tsinghua.edu.cn/simple'''</p>
<p>'''trusted-host = pypi.tuna.tsinghua.edu.cn'''</p>
<p>'''EOF'''</p>|}</li>
<li><p>Then install the Python library with pip3, it will be fast</p></li></ol>
</li>
<li><p>The method of temporarily replacing the pip source under Linux, the '''&lt;packagename&gt;''' needs to be replaced with a specific package name</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''pip3 install &lt;packagename&gt; -i \'''</p>
<p>'''https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn'''</p>|}</li></ol>
<span id="the-method-of-installing-the-docker"></span>
 
== The Method Of Installing The Docker ==

Navigation menu