dstrigl / HtREST

Heliotherm heat pump REST API server
Other
11 stars 0 forks source link

No module named 'werkzeug' armbian #344

Open reset12 opened 1 week ago

reset12 commented 1 week ago

I tried to install HtREst on a new System with the following error:

Traceback (most recent call last): File "/usr/local/bin/htrest", line 33, in sys.exit(load_entry_point('htrest==0.1.11', 'console_scripts', 'htrest')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/bin/htrest", line 25, in importlib_load_entry_point return next(matches).load() ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/metadata/init.py", line 202, in load module = import_module(match.group('module')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1206, in _gcd_import File "", line 1178, in _find_and_load File "", line 1149, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/usr/local/lib/python3.11/dist-packages/htrest-0.1.11-py3.11.egg/htrest/main.py", line 37, in from .app import create_app File "/usr/local/lib/python3.11/dist-packages/htrest-0.1.11-py3.11.egg/htrest/app.py", line 26, in from flask import Flask, current_app File "/usr/local/lib/python3.11/dist-packages/flask-3.0.3-py3.11.egg/flask/init.py", line 5, in from . import json as json File "/usr/local/lib/python3.11/dist-packages/flask-3.0.3-py3.11.egg/flask/json/init.py", line 6, in from ..globals import current_app File "/usr/local/lib/python3.11/dist-packages/flask-3.0.3-py3.11.egg/flask/globals.py", line 6, in from werkzeug.local import LocalProxy ModuleNotFoundError: No module named 'werkzeug'

Distributor ID: Debian Description: Armbian 24.8.2 bookworm Release: 12 Codename: bookworm

Install Commands: python3 -m venv /home/t759f/venv /home/user/venv/bin/pip install HtREST --upgrade

How can i solve it ? with regards reset12

dstrigl commented 1 week ago

Just try the following:

pip3 install Werkzeug==2.1.2 --upgrade
pip3 install flask==2.1.3 --upgrade
reset12 commented 6 days ago

It doesnt work.

'user@odroidxu4:~$ /home/user/venv/bin/pip3 install flask==2.1.3 --upgrade Collecting flask==2.1.3 Downloading Flask-2.1.3-py3-none-any.whl (95 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.6/95.6 kB 1.2 MB/s eta 0:00:00 Requirement already satisfied: Werkzeug>=2.0 in ./venv/lib/python3.11/site-packages (from flask==2.1.3) (2.1.2) Requirement already satisfied: Jinja2>=3.0 in ./venv/lib/python3.11/site-packages (from flask==2.1.3) (3.1.4) Requirement already satisfied: itsdangerous>=2.0 in ./venv/lib/python3.11/site-packages (from flask==2.1.3) (2.2.0) Requirement already satisfied: click>=8.0 in ./venv/lib/python3.11/site-packages (from flask==2.1.3) (8.1.7) Requirement already satisfied: MarkupSafe>=2.0 in ./venv/lib/python3.11/site-packages (from Jinja2>=3.0->flask==2.1.3) (2.1.5) Installing collected packages: flask Attempting uninstall: flask Found existing installation: Flask 2.0.3 Uninstalling Flask-2.0.3: Successfully uninstalled Flask-2.0.3 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. htrest 0.1.11 requires Flask==2.0.3, but you have flask 2.1.3 which is incompatible. Successfully installed flask-2.1.3 user@odroidxu4:~$ /home/user/venv/bin/pip3 install flask==2.1.2 --upgrade Collecting flask==2.1.2 Downloading Flask-2.1.2-py3-none-any.whl (95 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.2/95.2 kB 1.1 MB/s eta 0:00:00 Requirement already satisfied: Werkzeug>=2.0 in ./venv/lib/python3.11/site-packages (from flask==2.1.2) (2.1.2) Requirement already satisfied: Jinja2>=3.0 in ./venv/lib/python3.11/site-packages (from flask==2.1.2) (3.1.4) Requirement already satisfied: itsdangerous>=2.0 in ./venv/lib/python3.11/site-packages (from flask==2.1.2) (2.2.0) Requirement already satisfied: click>=8.0 in ./venv/lib/python3.11/site-packages (from flask==2.1.2) (8.1.7) Requirement already satisfied: MarkupSafe>=2.0 in ./venv/lib/python3.11/site-packages (from Jinja2>=3.0->flask==2.1.2) (2.1.5) Installing collected packages: flask Attempting uninstall: flask Found existing installation: Flask 2.1.3 Uninstalling Flask-2.1.3: Successfully uninstalled Flask-2.1.3 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. htrest 0.1.11 requires Flask==2.0.3, but you have flask 2.1.2 which is incompatible. Successfully installed flask-2.1.2 user@odroidxu4:~$ htrest -d /dev/ttyUSB0 -b 19200 --host localhost --port 8777 --read-only & [1] 2269 user@odroidxu4:~$ Traceback (most recent call last): File "/usr/local/bin/htrest", line 33, in sys.exit(load_entry_point('htrest==0.1.11', 'console_scripts', 'htrest')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/bin/htrest", line 25, in importlib_load_entry_point return next(matches).load() ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/metadata/init.py", line 202, in load module = import_module(match.group('module')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1206, in _gcd_import File "", line 1178, in _find_and_load File "", line 1149, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/usr/local/lib/python3.11/dist-packages/htrest-0.1.11-py3.11.egg/htrest/main.py", line 37, in from .app import create_app File "/usr/local/lib/python3.11/dist-packages/htrest-0.1.11-py3.11.egg/htrest/app.py", line 26, in from flask import Flask, current_app File "/usr/local/lib/python3.11/dist-packages/flask-3.0.3-py3.11.egg/flask/init.py", line 5, in from . import json as json File "/usr/local/lib/python3.11/dist-packages/flask-3.0.3-py3.11.egg/flask/json/init.py", line 6, in from ..globals import current_app File "/usr/local/lib/python3.11/dist-packages/flask-3.0.3-py3.11.egg/flask/globals.py", line 6, in from werkzeug.local import LocalProxy ModuleNotFoundError: No module named 'werkzeug' `

dstrigl commented 6 days ago

Can you create a fresh new venv, install HtREST and export the installed modules with pip freeze to take a look on it.

reset12 commented 6 days ago

It does not work at all on armbian bookworm. I tried from source and get also errors.

sudo python3 setup.py install running install /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( /usr/lib/python3/dist-packages/setuptools/command/easy_install.py:146: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( running bdist_egg running egg_info creating htrest.egg-info writing htrest.egg-info/PKG-INFO writing dependency_links to htrest.egg-info/dependency_links.txt writing entry points to htrest.egg-info/entry_points.txt writing requirements to htrest.egg-info/requires.txt writing top-level names to htrest.egg-info/top_level.txt writing manifest file 'htrest.egg-info/SOURCES.txt' reading manifest file 'htrest.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching 'pycache' found anywhere in distribution warning: no previously-included files matching '.coverage' found anywhere in distribution warning: no previously-included files matching '.py[co]' found anywhere in distribution warning: no previously-included files matching '.git' found anywhere in distribution adding license file 'LICENSE' writing manifest file 'htrest.egg-info/SOURCES.txt' installing library code to build/bdist.linux-armv7l/egg running install_lib running build_py creating build creating build/lib creating build/lib/htrest copying htrest/init.py -> build/lib/htrest copying htrest/main.py -> build/lib/htrest copying htrest/version.py -> build/lib/htrest copying htrest/apiv1.py -> build/lib/htrest copying htrest/app.py -> build/lib/htrest copying htrest/settings.py -> build/lib/htrest creating build/lib/htrest/apis copying htrest/apis/init.py -> build/lib/htrest/apis copying htrest/apis/date_time.py -> build/lib/htrest/apis copying htrest/apis/device.py -> build/lib/htrest/apis copying htrest/apis/fast_query.py -> build/lib/htrest/apis copying htrest/apis/fault_list.py -> build/lib/htrest/apis copying htrest/apis/overwrite.py -> build/lib/htrest/apis copying htrest/apis/param.py -> build/lib/htrest/apis copying htrest/apis/time_prog.py -> build/lib/htrest/apis copying htrest/apis/utils.py -> build/lib/htrest/apis copying htrest/logging.conf -> build/lib/htrest creating build/bdist.linux-armv7l creating build/bdist.linux-armv7l/egg creating build/bdist.linux-armv7l/egg/htrest copying build/lib/htrest/init.py -> build/bdist.linux-armv7l/egg/htrest copying build/lib/htrest/main.py -> build/bdist.linux-armv7l/egg/htrest copying build/lib/htrest/version.py -> build/bdist.linux-armv7l/egg/htrest copying build/lib/htrest/apiv1.py -> build/bdist.linux-armv7l/egg/htrest copying build/lib/htrest/app.py -> build/bdist.linux-armv7l/egg/htrest copying build/lib/htrest/settings.py -> build/bdist.linux-armv7l/egg/htrest creating build/bdist.linux-armv7l/egg/htrest/apis copying build/lib/htrest/apis/init.py -> build/bdist.linux-armv7l/egg/htrest/apis copying build/lib/htrest/apis/date_time.py -> build/bdist.linux-armv7l/egg/htrest/apis copying build/lib/htrest/apis/device.py -> build/bdist.linux-armv7l/egg/htrest/apis copying build/lib/htrest/apis/fast_query.py -> build/bdist.linux-armv7l/egg/htrest/apis copying build/lib/htrest/apis/fault_list.py -> build/bdist.linux-armv7l/egg/htrest/apis copying build/lib/htrest/apis/overwrite.py -> build/bdist.linux-armv7l/egg/htrest/apis copying build/lib/htrest/apis/param.py -> build/bdist.linux-armv7l/egg/htrest/apis copying build/lib/htrest/apis/time_prog.py -> build/bdist.linux-armv7l/egg/htrest/apis copying build/lib/htrest/apis/utils.py -> build/bdist.linux-armv7l/egg/htrest/apis copying build/lib/htrest/logging.conf -> build/bdist.linux-armv7l/egg/htrest byte-compiling build/bdist.linux-armv7l/egg/htrest/init.py to init.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/main.py to main.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/version.py to version.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/apiv1.py to apiv1.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/app.py to app.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/settings.py to settings.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/apis/init.py to init.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/apis/date_time.py to date_time.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/apis/device.py to device.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/apis/fast_query.py to fast_query.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/apis/fault_list.py to fault_list.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/apis/overwrite.py to overwrite.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/apis/param.py to param.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/apis/time_prog.py to time_prog.cpython-311.pyc byte-compiling build/bdist.linux-armv7l/egg/htrest/apis/utils.py to utils.cpython-311.pyc creating build/bdist.linux-armv7l/egg/EGG-INFO copying htrest.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO copying htrest.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying htrest.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying htrest.egg-info/entry_points.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying htrest.egg-info/not-zip-safe -> build/bdist.linux-armv7l/egg/EGG-INFO copying htrest.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying htrest.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO creating dist creating 'dist/htrest-0.1.11-py3.11.egg' and adding 'build/bdist.linux-armv7l/egg' to it removing 'build/bdist.linux-armv7l/egg' (and everything under it) Processing htrest-0.1.11-py3.11.egg removing '/usr/local/lib/python3.11/dist-packages/htrest-0.1.11-py3.11.egg' (and everything under it) creating /usr/local/lib/python3.11/dist-packages/htrest-0.1.11-py3.11.egg Extracting htrest-0.1.11-py3.11.egg to /usr/local/lib/python3.11/dist-packages htrest 0.1.11 is already the active version in easy-install.pth Installing htrest script to /usr/local/bin

Installed /usr/local/lib/python3.11/dist-packages/htrest-0.1.11-py3.11.egg Processing dependencies for htrest==0.1.11 Searching for Flask-BasicAuth==0.2.0 Reading https://pypi.org/simple/Flask-BasicAuth/ Downloading https://files.pythonhosted.org/packages/16/18/9726cac3c7cb9e5a1ac4523b3e508128136b37aadb3462c857a19318900e/Flask-BasicAuth-0.2.0.tar.gz#sha256=df5ebd489dc0914c224419da059d991eb72988a01cdd4b956d52932ce7d501ff Best match: Flask-BasicAuth 0.2.0 Processing Flask-BasicAuth-0.2.0.tar.gz Writing /tmp/easy_install-rzbuu7uo/Flask-BasicAuth-0.2.0/setup.cfg Running Flask-BasicAuth-0.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-rzbuu7uo/Flask-BasicAuth-0.2.0/egg-dist-tmp-dw1h0pmq warning: no previously-included files matching '.pyc' found under directory 'docs' no previously-included directories found matching 'docs/_build' warning: no previously-included files found matching 'docs/_themes/.git' /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( Traceback (most recent call last): File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 156, in save_modules yield saved File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 198, in setup_context yield File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 259, in run_setup _execfile(setup_script, ns) File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 46, in _execfile exec(code, globals, locals) File "/tmp/easy_install-rzbuu7uo/Flask-BasicAuth-0.2.0/setup.py", line 16, in filename = os.path.join(os.path.abspath(os.path.dirname(file)), parts) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/init.py", line 108, in setup return distutils.core.setup(**attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command super().run_command(command) File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 165, in run cmd = self.call_command('install_lib', warn_dir=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 151, in call_command self.run_command(cmdname) File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command super().run_command(command) File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.ensure_finalized() File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized self.finalize_options() File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 17, in finalize_options self.set_undefined_options('install',('install_layout','install_layout')) File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 296, in set_undefined_options setattr(self, dst_option, getattr(src_cmd_obj, src_option)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 107, in getattr raise AttributeError(attr) AttributeError: install_layout. Did you mean: 'install_platlib'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/tmp/HtREST/setup.py", line 56, in setup( File "/usr/lib/python3/dist-packages/setuptools/init.py", line 108, in setup return distutils.core.setup(*attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command super().run_command(command) File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 74, in run self.do_egg_install() File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 131, in do_egg_install cmd.run(show_deprecation=False) File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 444, in run self.easy_install(spec, not self.no_deps) File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 686, in easy_install return self.install_item(None, spec, tmpdir, deps, True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 733, in install_item self.process_distribution(spec, dist, deps) File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 778, in process_distribution distros = WorkingSet([]).resolve( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 815, in resolve dist = self._resolve_dist( ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 851, in _resolve_dist dist = best[req.key] = env.best_match( ^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 1123, in best_match return self.obtain(req, installer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 1135, in obtain return installer(requirement) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 705, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 731, in install_item dists = self.install_eggs(spec, download, tmpdir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 924, in install_eggs return self.build_and_install(setup_script, setup_base) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1198, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1182, in run_setup run_setup(setup_script, args) File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 249, in run_setup with setup_context(setup_dir): File "/usr/lib/python3.11/contextlib.py", line 155, in exit self.gen.throw(typ, value, traceback) File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 190, in setup_context with save_modules(): File "/usr/lib/python3.11/contextlib.py", line 155, in exit self.gen.throw(typ, value, traceback) File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 169, in save_modules saved_exc.resume() File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 143, in resume raise exc.with_traceback(self._tb) File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 156, in save_modules yield saved File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 198, in setup_context yield File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 259, in run_setup _execfile(setup_script, ns) File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 46, in _execfile exec(code, globals, locals) File "/tmp/easy_install-rzbuu7uo/Flask-BasicAuth-0.2.0/setup.py", line 16, in filename = os.path.join(os.path.abspath(os.path.dirname(file)), parts) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/init.py", line 108, in setup return distutils.core.setup(**attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command super().run_command(command) File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 165, in run cmd = self.call_command('install_lib', warn_dir=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 151, in call_command self.run_command(cmdname) File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command super().run_command(command) File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.ensure_finalized() File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized self.finalize_options() File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 17, in finalize_options self.set_undefined_options('install',('install_layout','install_layout')) File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 296, in set_undefined_options setattr(self, dst_option, getattr(src_cmd_obj, src_option)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 107, in getattr raise AttributeError(attr) AttributeError: install_layout

On previus version of armbian it worked.

dstrigl commented 6 days ago

Maybe it's the problem that Flask-BasicAuth (and/or some of the other needed modules) doesn't work under Python 3.11? I didn't test HtREST or htheatpump under Python 3.11 so far. Can you test it with Python 3.10?

reset12 commented 5 days ago

I got it working with Python 3.10 with the following commands :

# install with pyenv
sudo apt install libreadline-dev
sudo apt-get install libffi-dev
sudo apt-get install libssl-dev 
sudo apt install libsqlite3-dev
sudo apt install liblzma-dev
sudo apt-get install libbz2-dev
sudo apt-get install python3-tk python3-dev tk-dev
curl https://pyenv.run | bash
who | awk '{print $1}'| echo "export PATH=$PATH:/home/"$(</dev/stdin)"/.pyenv/bin/" >/tmp/rc
who | awk '{print $1}'| cat /tmp/rc >>/home/"$(</dev/stdin)"/.bashrc
#exit shell and start new to get changes
pyenv install 3.10
pyenv versions
pyenv virtualenv 3.10 htrest
pyenv local htrest
pyenv which python
who | awk '{print $1}'|echo 'eval "$(pyenv init -)"' >>/home/"$(</dev/stdin)"/.bashrc
who | awk '{print $1}'|echo 'eval "$(pyenv virtualenv-init -)"' >>/home/"$(</dev/stdin)"/.bashrc
pyenv activate htrest
wget https://github.com/dstrigl/HtREST/archive/refs/heads/master.zip
unzip master.zip
cd HtREST-*
who | awk '{print $1}'|sudo /home/"$(</dev/stdin)"/.pyenv/versions/htrest/bin/python setup.py install

Start with:
who | awk '{print $1}'|/home/"$(</dev/stdin)"/.pyenv/shims/htrest -d /dev/ttyUSB0 -b 19200 --host localhost --port 8777 --read-only &