id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 2227630565,I_kwDOAMm_X86ExvHl,8912,xarray and pyinstaller,135848029,closed,0,,,3,2024-04-05T10:14:44Z,2024-04-08T07:10:46Z,2024-04-05T20:26:48Z,NONE,,,,"### What is your issue? I am working on a Windows 11 computer with Python 3.11.9 installed as the only version of Python I am working in Virtual Studio Code I have created and activated a venv virtual environment for my project (not a conda one) I used the pip command to install xarray into the virtual environment I have a test script called Testing.py and the only thing it does is import xarray as xr and then it prints a message to the terminal window This works 100% in python in the VSC terminal window I then issue the following command pyinstaller --onefile Testing.py This creates a file called Testing.exe for me When I run Testing.exe I get the following error message **Traceback (most recent call last): File ""importlib\metadata\__init__.py"", line 563, in from_name StopIteration During handling of the above exception, another exception occurred: Traceback (most recent call last): File ""Testing.py"", line 20, in File ""PyInstaller\loader\pyimod02_importers.py"", line 419, in exec_module File ""xarray\__init__.py"", line 3, in File ""PyInstaller\loader\pyimod02_importers.py"", line 419, in exec_module File ""xarray\testing\__init__.py"", line 1, in File ""PyInstaller\loader\pyimod02_importers.py"", line 419, in exec_module File ""xarray\testing\assertions.py"", line 11, in File ""PyInstaller\loader\pyimod02_importers.py"", line 419, in exec_module File ""xarray\core\duck_array_ops.py"", line 36, in File ""PyInstaller\loader\pyimod02_importers.py"", line 419, in exec_module File ""xarray\core\dask_array_ops.py"", line 3, in File ""PyInstaller\loader\pyimod02_importers.py"", line 419, in exec_module File ""xarray\core\nputils.py"", line 14, in File ""xarray\namedarray\utils.py"", line 60, in module_available File ""importlib\metadata\__init__.py"", line 1009, in version File ""importlib\metadata\__init__.py"", line 982, in distribution File ""importlib\metadata\__init__.py"", line 565, in from_name importlib.metadata.PackageNotFoundError: No package metadata was found for numpy [15596] Failed to execute script 'Testing' due to unhandled exception!** Please, is there anyone who can suggest what I need to do to get around this problem .... I need to distribute my project when it is complete","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8912/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue