How to install the most recent Python in your Synology diskstation

PHPz
发布: 2024-07-18 18:53:27
原创
835 人浏览过

Synology, the taiwanese manufacturer of the best NASes in the world, deliveres its devices with a RTD1619B processor, which is based the in ARM-64 architecture (also known as aarch64). I possess a NAS DS223j, after owning a DS212j for 11 years since 2012.
Being a Python-savyy developer, it is unfortunate that Synology does not ship its NASes with Python support built-in, so I have to download its Python distribution using the Package Center for the Diskstation. THe problem is that it is a old version of Python: 3.8, which was shipped more than 4 years ago. I need to use the most recent features of Python, so it is an handicap had to use and old Python.
The alternative to use the most recent Python (at the time of this article is 3.21), you can use the Python shipped by Anaconda, which provides a package manager compiled statically available for download called micromamba, which you can download by following the instructions at mamba.readthedocs.io.
Here are the steps:

  1. In a bash shell, execute curl -Ls https://micro.mamba.pm/api/micromamba/linux-aarch64/latest | tar -xvj bin/micromamba
  2. This will download the micromamba binary into the bin subfolder
  3. Then, execute ./bin/micromamba shell init -s bash. This will add a initialization snippet into the .bashrc file.
  4. Then, do a source ~/.bashrc and micromamba activate && micromamba config append channels conda-forge
  5. The last command will configure micromamba to download the last releases of a python basic development environment which can started by micromamba install
  6. Once there, execute the python executable and voila, you have a very recent compiled python, perhaps no more than 1 month old ! The basic installation also installs pip, so you have all the power of Python on your hands!

References:

  • https://avivleemann.github.io/blog/blog/posts/2023-12-07-micromamba/micromamba-guide.html
  • https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html#mamba-org-releases

Image description

以上是How to install the most recent Python in your Synology diskstation的详细内容。更多信息请关注PHP中文网其他相关文章!

来源:dev.to
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!