在群晖中安装python3及pip3

安装python3

套件中心中搜索安装python3

控制面板\终端机和SNMP中开启启动SSH功能

连接群晖ssh
输入sudo -i 输入密码获取root权限

为python3创建软连接
dsm 6.2.3下路径为@appstore/py3k/usr/local/bin/python3
volume1为安装时选择的盘符

ln -s /volume1/@appstore/py3k/usr/local/bin/python3 /usr/bin/python3

执行python3 -V可看到输出信息

Python 3.8.2

安装pip与setuptools

手动下载pip与setuptools

https://files.pythonhosted.org/packages/b7/2d/ad02de84a4c9fd3b1958dc9fb72764de1aa2605a9d7e943837be6ad82337/pip-21.0.1.tar.gz

https://files.pythonhosted.org/packages/b8/d3/155ebd29b6e34ac283614d3a1e7f476ffb93f535aa0d8b3647fa014815aa/setuptools-54.1.2.tar.gz

也可使用 wget 下载

wget https://files.pythonhosted.org/packages/b7/2d/ad02de84a4c9fd3b1958dc9fb72764de1aa2605a9d7e943837be6ad82337/pip-21.0.1.tar.gz

wget https://files.pythonhosted.org/packages/b8/d3/155ebd29b6e34ac283614d3a1e7f476ffb93f535aa0d8b3647fa014815aa/setuptools-54.1.2.tar.gz

解压setuptools包并编译安装

tar -zxvf setuptools-54.1.2.tar.gz
cd setuptools-54.1.2.tar.gz
python3 setup.py build
python3 setup.py install

解压pip包并编译安装

tar -zxvf pip-21.0.1.tar.gz
cd pip-21.0.1.tar.gz
python3 setup.py build
python3 setup.py install

为pip创建软连接 注意路径

ln -s /volume1/@appstore/py3k/usr/local/bin/pip3 /usr/bin/pip3

执行pip3 -V可看到输出信息

pip 21.0.1 from /var/packages/py3k/target/usr/local/lib/python3.8/site-packages/pip-21.0.1-py3.8.egg/pip (python 3.8)

用python3实现基于华为云的动态解析(ddns)https://blog.cosdk.com/archives/1797

固定链接: https://blog.cosdk.com/archives/1797