massive update for Mogan Research 1.2.5

This commit is contained in:
Darcy Shen 2024-02-24 11:38:26 +08:00
parent 64a5d8b40d
commit 73005e7d0a
49 changed files with 3265 additions and 2793 deletions

View file

@ -1,11 +1,11 @@
<TeXmacs|2.1.3>
<TeXmacs|2.1.2>
<style|<tuple|generic|chinese>>
<\body>
<doc-data|<doc-title|如何在Debian中切换默认Python版本>>
<doc-data|<doc-title|\<#5982\>\<#4F55\>\<#5728\>Debian\<#4E2D\>\<#5207\>\<#6362\>\<#9ED8\>\<#8BA4\>Python\<#7248\>\<#672C\>>>
首先查看当前系统中默认的Python版本
\<#9996\>\<#5148\>\<#67E5\>\<#770B\>\<#5F53\>\<#524D\>\<#7CFB\>\<#7EDF\>\<#4E2D\>\<#9ED8\>\<#8BA4\>\<#7684\>Python\<#7248\>\<#672C\>\<#FF1A\>
<\session|shell|default>
<\output>
@ -23,7 +23,7 @@
</input>
</session>
然后查看当前系统可用的Python有哪些
\<#7136\>\<#540E\>\<#67E5\>\<#770B\>\<#5F53\>\<#524D\>\<#7CFB\>\<#7EDF\>\<#53EF\>\<#7528\>\<#7684\>Python\<#6709\>\<#54EA\>\<#4E9B\>\<#FF1A\>
<\session|shell|default>
<\unfolded-io|Shell] >
@ -38,7 +38,7 @@
</input>
</session>
我们可以把以上的python版本都放入python命令的候补列表
\<#6211\>\<#4EEC\>\<#53EF\>\<#4EE5\>\<#628A\>\<#4EE5\>\<#4E0A\>\<#7684\>python\<#7248\>\<#672C\>\<#90FD\>\<#653E\>\<#5165\>python\<#547D\>\<#4EE4\>\<#7684\>\<#5019\>\<#8865\>\<#5217\>\<#8868\>\<#FF1A\>
<\shell-code>
sudo update-alternatives --install /usr/bin/python python
@ -51,7 +51,7 @@
/usr/bin/python3.10 4
</shell-code>
现在我们可以列出这个候补列表
\<#73B0\>\<#5728\>\<#6211\>\<#4EEC\>\<#53EF\>\<#4EE5\>\<#5217\>\<#51FA\>\<#8FD9\>\<#4E2A\>\<#5019\>\<#8865\>\<#5217\>\<#8868\>
<\session|shell|default>
<\unfolded-io|Shell] >
@ -77,16 +77,16 @@
</input>
</session>
现在默认的Python版本已经切换到Python
3.10.5,说明上面最后的数字越大,优先级越高。
\<#73B0\>\<#5728\>\<#9ED8\>\<#8BA4\>\<#7684\>Python\<#7248\>\<#672C\>\<#5DF2\>\<#7ECF\>\<#5207\>\<#6362\>\<#5230\>Python
3.10.5\<#FF0C\>\<#8BF4\>\<#660E\>\<#4E0A\>\<#9762\>\<#6700\>\<#540E\>\<#7684\>\<#6570\>\<#5B57\>\<#8D8A\>\<#5927\>\<#FF0C\>\<#4F18\>\<#5148\>\<#7EA7\>\<#8D8A\>\<#9AD8\>\<#3002\>
我们也可以使用
\<#6211\>\<#4EEC\>\<#4E5F\>\<#53EF\>\<#4EE5\>\<#4F7F\>\<#7528\>
<\shell-code>
<code|update-alternatives --config python>
</shell-code>
在终端中以交互模式选择我们的默认Python版本。
\<#5728\>\<#7EC8\>\<#7AEF\>\<#4E2D\>\<#4EE5\>\<#4EA4\>\<#4E92\>\<#6A21\>\<#5F0F\>\<#9009\>\<#62E9\>\<#6211\>\<#4EEC\>\<#7684\>\<#9ED8\>\<#8BA4\>Python\<#7248\>\<#672C\>\<#3002\>
</body>
<\initial>