NAS 環境に Flask のインストール
先ず Debian 環境に Flask をインストール.
pip3 install Flask
サンプルの hello.py を実行,ブラウザで表示.
AS5202T でも同様に Flask をインストール.
pip3 install Flask
Synology NAS では pip のインストールから.
suto opkg install python-pip
suto opkg install python3-pip
Flask をインストールしてみたが …
Iwao@DS116:~/pyt_test/t_flask$ pip3 install Flask Collecting Flask Using cached https://files.pythonhosted.org/packages/f2/28/2a03252dfb9ebf377f40fba6a7841b47083260bf8bd8e737b0c6952df83f/Flask-1.1.2-py2.py3-none-any.whl Collecting click>=5.1 (from Flask) Using cached https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl Collecting itsdangerous>=0.24 (from Flask) Using cached https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl Collecting Werkzeug>=0.15 (from Flask) Using cached https://files.pythonhosted.org/packages/cc/94/5f7079a0e00bd6863ef8f1da638721e9da21e5bacee597595b318f71d62e/Werkzeug-1.0.1-py2.py3-none-any.whl Collecting Jinja2>=2.10.1 (from Flask) Using cached https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl Collecting MarkupSafe>=0.23 (from Jinja2>=2.10.1->Flask) Using cached https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz Complete output from command python setup.py egg_info: /opt/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'project_urls' /opt/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'include_package_data' /opt/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'python_requires' usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: -c --help [cmd1 cmd2 ...] or: -c --help-commands or: -c cmd --help error: invalid command 'egg_info' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-dsqn65uh/MarkupSafe/ Iwao@DS116:~/pyt_test/t_flask$
「 Command python setup.py egg_info faild with error code 1 」で検索 をかけると pip などが古いとある.
次の様にして pip などを更新.
sudo pip install –upgrade pip setuptools