Runtime error caused by importing numpy

105 views
Skip to first unread message

Yitzhak Weissman

unread,
Aug 19, 2024, 5:42:32 AM8/19/24
to PyInstaller
I have a script called 'import_numpy' with a single line: 'import numpy'. The script runs fine with my interpreter. I have run pyinstaller to create an '.exe' file from this script. When I launched the file, I obtained this error:Numpy error.jpg
I would greatly appreciate any help with fixing this issue.

bwoodsend

unread,
Aug 19, 2024, 6:16:40 AM8/19/24
to PyInstaller

Importing numpy (albeit with 2.0.1) on Windows with Python 3.12 is part of PyInstaller’s and numpy’s test suites so your environment or something you’re doing must be an outlier here. Is anaconda involved by any chance?

Yitzhak Weissman

unread,
Aug 19, 2024, 6:20:46 AM8/19/24
to PyInstaller
No anaconda. The script uses a virtual environment with Python 3.12, created by PyCharm. Both Python and Numpy were installed by PyCharm.

Yitzhak Weissman

unread,
Aug 19, 2024, 6:27:43 AM8/19/24
to PyInstaller
Just tested 2.0.1. Same error

Yitzhak Weissman

unread,
Aug 19, 2024, 7:06:34 AM8/19/24
to PyInstaller
Update: I just created a new project (with PyCharm) and configured it to work with Python 3.10. The error disappeared, so the issue is resolved for me.
Reply all
Reply to author
Forward
0 new messages