-
Notifications
You must be signed in to change notification settings - Fork 76
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
Pyinstaller fail to package echopype as it cannot import name 'Blosc' from 'numcodecs' #532
Comments
I've never used pyinstaller. I don't recall us running into blosc errors when building or using echopype, and I'm reasonably certain that we've used blosc compression with zarr exports fairly often; I think it's the default. The error described in zarr-developers/numcodecs#291 definitely seems to be the same as yours. It helps that it's a very recent issue, though an important difference is that it's on Windows rather than Ubuntu. Unfortunately it doesn't look like they've arrived at helpful diagnostics. While I haven't experienced problems with numcodecs/blosc myself, it looks like such issues are not rare, though more typically associated with Windows and Mac OS than Linux. This comment from 6 months ago is a good summary:
However, that still won't help you. If you're still having problems we may be in a better position to explore this issue next week. |
I haven't used pyinstaller before, but I've run into a very similar error when packaging echopype sometime before, also coming from Blosc via zarr. At that time I pinned a lower zarr version since it is coming from a new release, and waited until the issue was resolved. @cywhale : do you have access to another OS that you could try it on? Also wonder what happens if you pinned the suggested zarr >= version in zarr-developers/numcodecs#291 before you bundle things together in pyinstaller? |
@leewujung I set up a Win10 python(3.9) virtualenv by conda, with echopype==0.5.5, zarr is newest 2.10.3, and then got the same error exactly as numcodecs#291. FYI |
I also received a numcodecs error when trying to install echopype via pip.
I tried to use the numcodecs pre-release. DeprecationWarning: notifyAll() is deprecated, use notify_all() instead self.bytes_consumed.notifyAll() If I import numcodecs, I don't see the Warning. The warning only appears after importing echopype or running an echopype function. Given that it is a warning, I will continue to see if I can use echopype. Update: I typically use PyCharm, so the deprecation warning may be associated with the IDE. I just ran through the OOI example in Windows Powershell and had no problems. |
@IanTBlack : Thanks so much for the very detailed description on what you have seen and a temp workaround. It sounded like that we could wait to see if numcodecs's next release would resolve this problem. Not sure where the bytes_condumed.notifyAll() error came from -- were you generating or performing computation using .zarr files? |
@leewujung I definitely think the notifyAll() error is associated with my IDE. I only ran through the first part of the OOI example, which I believe generates a zarr from the OOI raw data archive. |
@IanTBlack : ok, this makes sense then, since this is related to the zarr component, so is consistent with the previous numcodecs issue. Thanks for reporting everything! Please keep us posted if this goes away in your later use. |
Hi all. I believe this should be fixed via pyinstaller/pyinstaller-hooks-contrib#420. Until a new release comes out, the master branch may be installed via a command like |
It works. Now I can correctly package echopype to exe. Thanks for sharing this. |
My .py that use echopype can normally run without error in dev. But when using Pyinstaller to make the .py executable, I got the error when running it (as following) after Pyinstaller successfully make it installed. I found the same error was also issued in
zarr-developers/numcodecs#291
I still have trouble to make it work after trying some methods and wonder if anyone use echopype had ever handled it before?
platform: Ubuntu 20.04.3 LTS virtualenv of python 3.8
echopype==0.5.5
pyinstaller==4.8
zarr==2.10.3
numcodecs==0.9.1
The text was updated successfully, but these errors were encountered: