-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Scipy #45
Comments
Please provide information about your environment and home assistant install to provide context. |
Same issue.
I'm using the home assistant core container:
|
I re-created my container and this seems to have resolved itself.. |
I am using HASSOS on a RPi. Supervisor Version: 201 Home Assistant 0.105.5
|
Curious if this is a docker related issue. I’m not familiar with the nuances of the docker setup. Are there specific steps that should be taken when installing additional python modules within a docker container? |
For HassIO (Home Assistant) there should be already pre-compiled whl files for the python packages. Normally they ship the container without the ability to compile it's own software (as far as I am aware) to make it faster and leaner. I reviewed the This may require an issue raised with Home Assistant. |
@lonelyseraphim there maybe a work around instead of waiting, if issue the command I'm poking the Home Assistant guys about how to request wheels for their site. |
I was able to use SSH to run the apk add gcc command and it appeared to install everything ok. However, upon reboot I receive a similar error: Mon Feb 24 2020 11:25:17 GMT-0600 (Central Standard Time) AND Mon Feb 24 2020 11:25:17 GMT-0600 (Central Standard Time) |
Hmmm almost looks like |
if you apk add |
I was under the impression they exposed pip in the shell. @lonelyseraphim keep in mind until there's scipy in the wheel archive you'll need to run Still waiting for a reply from the devs about my question as well. |
I rolled back to the pre Scipy version for now to keep things running. Will continue to check in and report back with updates. |
Lets keep this issue open until there's a reply from the HA devs |
Toss my hat in on this one (docker). Updated image, rolled back to 0.1.0 and still getting error. Even tried apk add python3-dev gcc and restart, still getting error. |
I undid 84fc5da for now as I had trouble rolling back to 0.7.0. Hopefully that will work for now. |
@FuzzyMistborn are you also on a Pi? |
Nope, x86
|
I'm testing with |
Looks like rolling back the commit worked for now. Will test apk add build-base python3-dev gcc tonight/when I have some more time. |
Didn't work, still missing something 👎 |
I might suggest rolling out a release that removes 84fc5da for now until we figure out the cause/solution for this issue. |
That would mean we keep the gif creation using imageio and loose the resizing? Are you able to see if you can add the PIL module referenced on this page without issue inside of docker? |
For now yes. I think having a release that works for folks is more important than the resize. But that's just my own opinion (as I also had issues rolling back via HACS and had to do things manually).
Won't have time tonight. Maybe tomorrow. |
0.1.2 released, I'll keep poking away at image resizing and poking the HA devs about their docker image whl files. |
Further investigating this issue, the reason Reference: |
Nice find. So we'll need to get the base HASS docker image updated to build on 3.11 alpine. |
Or make your own dockerfile |
True but that's time consuming :-) And hmmm...looks like they added Alpine 3.11 back in December: home-assistant/docker-base#55 |
If you open docker shell into the container and |
Huh, wonder why they aren't basing off 3.11 then with that commit. |
I guess you could nab the docker file from their repo ie: and on a Pi I'll give it a shot later tonight/tomorrow |
When I do apk add docker-compse and it installs after reboot I get the following error. I don't seem to get any scripy error now at least. `Logger: homeassistant.components.sensor Error while setting up mail_and_packages platform for sensor |
Remove and re-add the integration that'll fix the error. |
Just fyi, something I noticed as I had several pieces of mail today I didn't get that scrambled image I was getting before. I wonder if scipy/resizing was causing that problem too. |
From what I can tell it seems it maybe a alpine issue some how, my venv install on RPi3 was working fine. |
There's new resize code in the latest beta, has anyone noticed any issues with the images that were occurring before with the scrambled image? @FuzzyMistborn @lonelyseraphim |
Not running it atm, will let you know when I do. |
This is working nicely. The large square items are being resize and centered. |
@moralmunky should help with the video generation as well. How's that look? |
The only think I've noticed is that it appears they are being saves out with a reduced color palette at some point in the process. |
It's part of the resizer, it's using the Lanczos filter to upscale/downscale as needed, but I've noticed the images appear far more clear and easier to read the text. |
Most of the USPS image don't have much contrast and it does improve readability.Reading up, It looks like that is the default behavior of resize_contain()? |
Correct, the full list of options are: NEAREST, BILINEAR, BICUBIC, LANCZOS |
With version 5cc6e12 I recieve the following error, the Scripy setup fails out.
Mon Feb 24 2020 07:00:15 GMT-0600 (Central Standard Time) Setup failed for mail_and_packages: Requirements for mail_and_packages not found: ['scipy'].
`Log Details (ERROR)
Mon Feb 24 2020 07:00:15 GMT-0600 (Central Standard Time)
Unable to install package scipy: ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-bzzwm1d2/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --find-links https://wheels.home-assistant.io/alpine-3.10/armv7/ -- wheel setuptools 'Cython>=0.29.13' 'numpy==1.13.3; python_version=='"'"'3.5'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.5'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'pybind11>=2.4.0'
cwd: None
Complete output (585 lines):
Keyring is skipped due to an exception: 'PosixPath' object has no attribute 'read_text'
Ignoring numpy: markers 'python_version == "3.5" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.8" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.5" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
Looking in links: https://wheels.home-assistant.io/alpine-3.10/armv7/
Collecting wheel
Using cached https://files.pythonhosted.org/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/3d/72/1c1498c1e908e0562b1e1cd30012580baa7d33b5b0ffdbeb5fde2462cc71/setuptools-45.2.0-py3-none-any.whl
Collecting Cython>=0.29.13
Using cached https://wheels.home-assistant.io/alpine-3.10/armv7/Cython-0.29.15-cp37-none-any.whl
Collecting numpy==1.14.5
Using cached https://files.pythonhosted.org/packages/d5/6e/f00492653d0fdf6497a181a1c1d46bbea5a2383e7faf4c8ca6d6f3d2581d/numpy-1.14.5.zip
Collecting pybind11>=2.4.0
Using cached https://files.pythonhosted.org/packages/4b/4d/ae1c4d8e8b139afa9682054dd42df3b0e3b5c1731287933021b9fd7e9cc4/pybind11-2.4.3-py2.py3-none-any.whl
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-edp6jc_o/numpy/setup.py'"'"'; file='"'"'/tmp/pip-install-edp6jc_o/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-_zhebn1d --python-tag cp37
cwd: /tmp/pip-install-edp6jc_o/numpy/
Complete output (258 lines):
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
NOT AVAILABLE
Failed to build numpy
ERROR: hangups 0.4.9 has requirement protobuf<=3.6.1,>=3.1.0, but you'll have protobuf 3.11.3 which is incompatible.
ERROR: aiopylgtv 0.3.3 has requirement numpy>=1.17.0, but you'll have numpy 1.14.5 which is incompatible.
ERROR: aioesphomeapi 2.6.1 has requirement protobuf==3.6.1, but you'll have protobuf 3.11.3 which is incompatible.
Installing collected packages: wheel, setuptools, Cython, numpy, pybind11
Running setup.py install for numpy: started
Running setup.py install for numpy: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-edp6jc_o/numpy/setup.py'"'"'; file='"'"'/tmp/pip-install-edp6jc_o/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-jgec4uq8/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-bzzwm1d2/overlay --compile
cwd: /tmp/pip-install-edp6jc_o/numpy/
Complete output (267 lines):
Running from numpy source directory.
ERROR: Command errored out with exit status 1: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-edp6jc_o/numpy/setup.py'"'"'; file='"'"'/tmp/pip-install-edp6jc_o/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-jgec4uq8/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-bzzwm1d2/overlay --compile Check the logs for full command output.
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ERROR: Command errored out with exit status 1: /usr/local/bin/python3 /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-bzzwm1d2/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --find-links https://wheels.home-assistant.io/alpine-3.10/armv7/ -- wheel setuptools 'Cython>=0.29.13' 'numpy==1.13.3; python_version=='"'"'3.5'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.5'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'pybind11>=2.4.0' Check the logs for full command output.
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.`
The text was updated successfully, but these errors were encountered: