Errors on macOS Catalina
PeterDragonTM opened this issue · 4 comments
If using python3
spectrum_painter % sudo python3 spectrum_painter/img2iqstream.py -s 1000000 -l 0.004 -o smiley.iqhackrf --format hackrf examples/smiley.png
Traceback (most recent call last):
File "spectrum_painter/img2iqstream.py", line 26, in
img2iqstream()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "spectrum_painter/img2iqstream.py", line 20, in img2iqstream
iq_samples = painter.convert_image(src)
AttributeError: module 'scipy.ndimage' has no attribute 'imread'
Scipy, click and numpy installed using brew and pip. both end up with the same error.
If using just python (Not python3)
sudo python3 spectrum_painter/img2iqstream.py -s 1000000 -l 0.004 -o smiley.iqhackrf --format hackrf examples/smiley.png
Traceback (most recent call last):
File "spectrum_painter/img2iqstream.py", line 26, in
img2iqstream()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "spectrum_painter/img2iqstream.py", line 20, in img2iqstream
iq_samples = painter.convert_image(src)
AttributeError: module 'scipy.ndimage' has no attribute 'imread'
pjd4sua@C02Y90HXJG5MMBP spectrum_painter % sudo python spectrum_painter/img2iqstream.py -s 1000000 -l 0.004 -o smiley.iqhackrf --format hackrf examples/smiley.png
Traceback (most recent call last):
File "spectrum_painter/img2iqstream.py", line 1, in
import click
ImportError: No module named click
% pip install click
Requirement already satisfied: click in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (7.1.2)
This seems to be due to some change in the location of ndimage. I pushed an update to master, can you try with this one? Also, you need the "imageio" package now since this is where ndimage was moved.
% python3 spectrum_painter/img2iqstream.py
Traceback (most recent call last):
File "spectrum_painter/img2iqstream.py", line 3, in <module>
from spectrum_painter import SpectrumPainter
import imageio as img
ModuleNotFoundError: No module named 'imageio'
% sudo python3 spectrum_painter/img2iqstream.py
Traceback (most recent call last):
File "spectrum_painter/img2iqstream.py", line 3, in <module>
from spectrum_painter import SpectrumPainter
import imageio as img
ModuleNotFoundError: No module named 'imageio'
Warning: openimageio 2.2.7_1 is already installed and up-to-date
To reinstall 2.2.7_1, run brew reinstall openimageio
You likely have the wrong imageio. You need this one: https://imageio.github.io/ and I suspect that brew line refers to this one: https://sites.google.com/site/openimageio/home
You could try pip3 install imageio
but I do not have a Mac and am not sure how Python packages are managed there.
Assuming this is done due to no further feedback.