Skip to content

Pyinstaller fail to package echopype as it cannot import name 'Blosc' from 'numcodecs' #532

@cywhale

Description

@cywhale

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

(py3.8) $ ./dist/myFunc 
Traceback (most recent call last):
  File "myFunc.py", line 25, in <module>
    import echopype as ep
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "echopype/__init__.py", line 5, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "echopype/calibrate/__init__.py", line 1, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "echopype/calibrate/api.py", line 3, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "xarray/__init__.py", line 1, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "xarray/tutorial.py", line 13, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "xarray/backends/__init__.py", line 17, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "xarray/backends/zarr.py", line 22, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "zarr/__init__.py", line 2, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "zarr/codecs.py", line 3, in <module>
ImportError: cannot import name 'Blosc' from 'numcodecs' (/tmp/_MEI1DhIqz/numcodecs/__init__.pyc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions