From 7ce813826214e01c4c736a74b4af4db4f756ecc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E6=B5=AA=E7=86=8A=E7=8C=AB=E5=84=BF?= Date: Sat, 6 Aug 2022 00:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=88=E6=B5=AA=E7=86=8A=E7=8C=AB=E5=84=BF?= =?UTF-8?q?=EF=BC=9A=E5=A6=82=E4=BD=95=E5=9C=A8Debian=E4=B8=AD=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E9=BB=98=E8=AE=A4=E7=9A=84Python=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 沈浪熊猫儿/index.tm | 36 +++---- ...在Debian中更改默认的Python版本.tm | 96 +++++++++++++++++++ 2 files changed, 115 insertions(+), 17 deletions(-) create mode 100644 沈浪熊猫儿/如何在Debian中更改默认的Python版本.tm diff --git a/沈浪熊猫儿/index.tm b/沈浪熊猫儿/index.tm index 8a7699d..10ae440 100644 --- a/沈浪熊猫儿/index.tm +++ b/沈浪熊猫儿/index.tm @@ -1,40 +1,42 @@ - + > <\body> <\hide-preamble> - \<#6D6A\>\<#718A\>\<#732B\>\<#513F\>/> + |||.tm>>>> - \<#6D6A\>\<#718A\>\<#732B\>\<#513F\>\<#7684\>\<#7A7A\>\<#95F4\>>> + > - \<#5927\>\<#5BB6\>\<#597D\>\<#FF0C\>\<#6211\>\<#662F\>Up\<#4E3B\>\<#6C88\>\<#6D6A\>\<#718A\>\<#732B\>\<#513F\><\footnote> + 大家好,我是Up主沈浪熊猫儿<\footnote> - \<#FF0C\>\<#6BD5\>\<#4E1A\>\<#4E8E\>\<#4E2D\>\<#56FD\>\<#79D1\>\<#5B66\>\<#6280\>\<#672F\>\<#5927\>\<#5B66\>\<#8BA1\>\<#7B97\>\<#673A\>\<#7CFB\>\<#FF0C\>\<#662F\>GNU - \<#7684\>\<#5F00\>\<#53D1\>\<#8005\>\<#548C\>\<#58A8\>\<#5E72\>\<#7F16\>\<#8F91\>\<#5668\>\<#7684\>\<#4F5C\>\<#8005\>\<#3002\>\<#8BD1\>\<#6709\>\<#300A\>Scala\<#5B9E\>\<#7528\>\<#6307\>\<#5357\>\<#300B\>\<#FF0C\>\<#73B0\>\<#5B9E\>\<#751F\>\<#6D3B\>\<#4E2D\>\<#662F\>\<#4E00\>\<#540D\>\<#6570\>\<#636E\>\<#5DE5\>\<#7A0B\>\<#5E08\>\<#3002\> + ,毕业于中国科学技术大学计算机系,是GNU + 的开发者和墨干编辑器的作者。译有《Scala实用指南》,现实生活中是一名数据工程师。 - \<#6211\>\<#7684\>\<#7535\>\<#5B50\>\<#90AE\>\<#7BB1\>\<#662F\>\<#FF0C\>\<#6B22\>\<#8FCE\>\<#5927\>\<#5BB6\>\<#53D1\>\<#90AE\>\<#4EF6\>\<#7ED9\>\<#6211\>\<#3002\> + 我的电子邮箱是,欢迎大家发邮件给我。 - \<#7AE0\>\<#5217\>\<#8868\>> + <\itemize> - \<#4F55\>\<#5B89\>\<#88C5\>Fandol\<#5B57\>\<#4F53\>> + - \<#7528\>\<#6237\>\<#5E38\>\<#7528\>\<#914D\>\<#7F6E\>> + - \<#6D59\>\<#6C5F\>\<#9AD8\>\<#8003\>\<#6570\>\<#5B66\>\<#7B2C\>\<#4E03\>\<#9898\>\<#51FD\>\<#6570\>\<#66F2\>\<#7EBF\>\<#7ED8\>\<#5236\>> + - \<#4F55\>\<#8F93\>\<#5165\>\<#5E0C\>\<#814A\>\<#5B57\>\<#6BCD\>> + - \<#672C\>\<#57FA\>\<#7840\>> + - \<#5236\>\<#5FEB\>\<#6377\>\<#952E\>\<#5FEB\>\<#901F\>\<#8F93\>\<#5165\>\<#4EE5\>1\<#4E3A\>\<#5206\>\<#5B50\>\<#7684\>\<#5206\>\<#5F0F\>> + - \<#4E3A\>\<#4EC0\>\<#4E48\>\<#8BF4\>Scala\<#662F\>JVM\<#4E0A\>\<#7684\>C++\<#FF1F\>> + + + 为什么说Scala是JVM上的C++?> @@ -55,7 +57,7 @@ <\auxiliary> <\collection> <\associate|toc> - |math-font-series||\<#6587\>\<#7AE0\>\<#5217\>\<#8868\>> + |math-font-series||文章列表> |.>>>>|> diff --git a/沈浪熊猫儿/如何在Debian中更改默认的Python版本.tm b/沈浪熊猫儿/如何在Debian中更改默认的Python版本.tm new file mode 100644 index 0000000..ce12d5e --- /dev/null +++ b/沈浪熊猫儿/如何在Debian中更改默认的Python版本.tm @@ -0,0 +1,96 @@ + + +> + +<\body> + > + + 首先查看当前系统中默认的Python版本: + + <\session|shell|default> + <\output> + Shell session inside TeXmacs pid = 1042144 + + + <\unfolded-io|Shell] > + python --version + <|unfolded-io> + Python 3.7.7 + + + <\input|Shell] > + \; + + + + 然后查看当前系统可用的Python有哪些: + + <\session|shell|default> + <\unfolded-io|Shell] > + ls /usr/bin/python[0-9].*[0-9] + <|unfolded-io> + /usr/bin/python3.10 \ /usr/bin/python3.7 \ /usr/bin/python3.8 + \ /usr/bin/python3.9 + + + <\input|Shell] > + \; + + + + 我们可以把以上的python版本都放入python命令的候补列表: + + <\shell-code> + sudo update-alternatives --install /usr/bin/python python + /usr/bin/python3.8 2 + + sudo update-alternatives --install /usr/bin/python python + /usr/bin/python3.9 3 + + sudo update-alternatives --install /usr/bin/python python + /usr/bin/python3.10 4 + + + 现在我们可以列出这个候补列表 + + <\session|shell|default> + <\unfolded-io|Shell] > + update-alternatives --list python + <|unfolded-io> + /usr/bin/python3.10 + + /usr/bin/python3.7 + + /usr/bin/python3.8 + + /usr/bin/python3.9 + + + <\unfolded-io|Shell] > + python --version + <|unfolded-io> + Python 3.10.5 + + + <\input|Shell] > + \; + + + + 现在默认的Python版本已经切换到Python + 3.10.5,说明上面最后的数字越大,优先级越高。 + + 我们也可以使用 + + <\shell-code> + + + + 在终端中以交互模式选择我们的默认Python版本。 + + +<\initial> + <\collection> + + + \ No newline at end of file