question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Numpy 1.19.3/4 not working for standalone mode

See original GitHub issue

Nuitka version, full Python version and Platform (Windows, OSX, Linux …)

0.6.10.2 Python: 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] Executable: C:\Users\user\PycharmProjects\PlotlyTest\venv\Scripts\python.exe OS: Windows Arch: x86_64

How did you install Nuitka and Python (pip, anaconda, deb, rpm, from source Python was installed using the 64-bit setup file in Windows and I installed Nuitka via the command: pip install nuitka

This was done in the project directory within Pycharm.

And the following command was used to run Nuitka: (I’ve tried also with --follow-imports parameter) python -m nuitka --standalone --show-progress --recurse-all --plugin-enable=numpy main.py

The program itself is quite simple and was written to test out a few things, the following are the imports: import plotly.graph_objects as go import numpy as np import os from pptx import Presentation from pptx.util import Inches from PIL import Image

And this is the error I see when I run the generated executable:

C:\Users\user\PycharmProjects\PlotlyExample\main.dist>main
Traceback (most recent call last):
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\__init__.py", line 22, in <module numpy.core>
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\multiarray.py", line 12, in <module numpy.core.multiarray>
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\overrides.py", line 7, in <module numpy.core.overrides>
ImportError: LoadLibraryExW 'C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\_multiarray_umath.pyd' failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\main.py", line 5, in <module>
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\__init__.py", line 140, in <module numpy>
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\__init__.py", line 48, in <module numpy.core>
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.9 from "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\python.exe"
  * The NumPy version is: "1.19.3"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: LoadLibraryExW 'C:\Users\\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\_multiarray_umath.pyd' failed: The specified module could not be found.

And the Python code is here: https://pastebin.com/RjRYUk0C

Thanks All!

Krishna

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
knadoorcommented, Dec 22, 2020

Thanks all, @kayhayen yeah I’m on Windows 10 Pro 64-bit (version 20H2, build 19042.685).

I previously use Numpy version 1.19.4 and received an error ( “runtimeError: package fails to pass a sanity check" - not Nuitka related) due to some known Numpy bug, then downgraded to 1.19.3.

0reactions
kayhayencommented, Jan 3, 2021

This has been released as 0.6.10.4 already.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuitka - Bountysource
Numpy 1.19.3/4 not working for standalone mode. ... Nuitka version, full Python version and Platform (Windows, OSX, Linux ...) 0.6.10.2
Read more >
Hypothesis Documentation - Read the Docs
Hypothesis is a Python library for creating unit tests which are simpler to write and more powerful when run, finding.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found