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.

Windows Nuitka builds failing when using pipenv in Github actions

See original GitHub issue
  • Nuitka version, full Python version and Platform (Windows, OSX, Linux …)
  0.6.7
  Python: 3.7 (Github python-version 3.7)
  OS: Windows Server 2019 (Github windows-latest)
  • How did you install Nuitka and Python (pip, anaconda, deb, rpm, from source, what is a virtualenv …), this is very important usually.

pip

  • If possible please supply a Short, Self Contained, Correct, Example that demonstrates the issue i.e a small piece of code which reproduces the issue and can be run with out any other (or as few as possible) external dependencies.
cat hello.py
print("Hello World")
pipenv run python -m nuitka hello.py --standalone --assume-yes-for-downloads

This produces the following:

Error, mismatch between Python ('x86_64') and C compiler ('pei-x86-64') arches.

This was working until a couple of days ago, possibly when an update to Github’s windows-latest image happened.

The Github config I am using is based on the nuitka one:

jobs:
  windows:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v2

    - name: Use Python 3.7
      uses: actions/setup-python@v1
      with:
        python-version: 3.7

    - name: Install MinGW using Conda
      shell: bash
      run: $CONDA/Scripts/conda install m2w64-gcc libpython

    - name: Install dependencies with pipenv
      shell: bash
      run: |
        pip install pipenv
        pipenv install --deploy --dev

    - name: Build with nuitka
      shell: bash
      run: CC=$CONDA/Library/mingw-w64/bin/gcc.exe make build_windows

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Feb 23, 2020

There is a solution for this on the factory branch. As discussed, Nuitka just uses the target_arch from Python, and avoids using objdump on the sys.executable at all.

I am still unsure how the original issue is even possible. I was not at all able to reproduce it, not with venv, not with virtualenv, and not with pipenv, but hey, it’s an optimization and makes your issue impossible to occur.

I tried to test with MSYS2, if the names of its objdump would be any different, but that one failed to work at all for me, unable to launch scons anymore without system error.

0reactions
kayhayencommented, May 11, 2020

The release 0.6.8 was just made and contains the correction.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Github actions for Windows and macOS CI · Issue #551
We have a Linux only public CI of our own, nightshift.nuitka.net, that has fallen into disrepair, since Buildbot failed to work with Apache...
Read more >
Windows+MSVC+scipy>=1.8.0 → segfault #1565 - GitHub
As a pro-tip, when adding nuitka to pipenv, enter a shell and go to git repository of Nuitka, then do python setup.py develop...
Read more >
Fail with dependecy-injector, no module named ... - GitHub
Nuitka version, full Python version, flavor, OS, etc. as output by this ... Fail with dependecy-injector, no module named 'dependency_injector.errors' #1936.
Read more >
Compilation fails without the --mingw64 switch. #396 - GitHub
Nuitka installed from pip through Poetry, in a Poetry-managed virtual environment: >py ... and tried to build it with the following command:.
Read more >
maximum recursion depth exceeded while calling a Python ...
OTOH, if I use Nuitka with the following options, ... Still failed. ... Maybe if I go to a slave Python install with...
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