fusion44 / blitz_api

A management backend for the RaspiBlitz project written in Python / FastAPI
MIT License
19 stars 18 forks source link

Install Api failed with FileNotFoundError #167

Closed ChuckNorrison closed 1 year ago

ChuckNorrison commented 1 year ago

Describe the bug Some users experience installation issue for Blitz Web + Api where api failed to install.

To Reproduce Steps to reproduce the behavior:

Still unknown under which circumstance this happens. A user updated from Raspiblitz 1.7.2 directly to 1.8.0c, using the update option and faced this error.

Can be reproduced with install script (blitz.web.api.sh on) or:

  1. Checkout the repo with git clone
  2. call pip install -r requirements.txt
  3. See error "No such file or directory: '/usr/bin/pip3.9'"

Expected behavior Install successful

Desktop (please complete the following information):

Additional context After installation from menu was done, there was no service blitzapi

sudo systemctl status blitzapi

Unit blitzapi.service could not be found

So i tried to pip install manually

cd /home/blitzapi/blitz_api
pip install -r requirements.txt

Results with:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Ignoring cffi: markers 'python_version >= "3.9" and python_version < "4.0" and implementation_name == "pypy"' don't match your environment Ignoring colorama: markers 'python_version >= "3.9" and python_version < "4.0" and platform_system == "Windows"' don't match your environment Ignoring py: markers 'python_version >= "3.9" and python_version < "4.0" and implementation_name == "pypy"' don't match your environment Ignoring pycparser: markers 'python_version >= "3.9" and python_version < "4.0" and implementation_name == "pypy"' don't match your environment [...] FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/pip3.9'

Originally posted by @ChuckNorrison in https://github.com/rootzoll/raspiblitz/issues/3262#issuecomment-1269907504

ChuckNorrison commented 1 year ago

Maybe fixed with this PR https://github.com/rootzoll/raspiblitz/pull/3455

fusion44 commented 1 year ago

Hmm yes, this doesn't look like a BlitzAPI problem. If you confirm that it is not working with the above PR, I'll take a close look again.

rootzoll commented 1 year ago

Backend API install now worked from me during sd card build in dev branch (with venv & fixed to v0.5.0 tag).