Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pip hangs when installing PyInstaller #103

Open
skysb opened this issue Oct 13, 2020 · 12 comments
Open

Pip hangs when installing PyInstaller #103

skysb opened this issue Oct 13, 2020 · 12 comments

Comments

@skysb
Copy link

skysb commented Oct 13, 2020

I have cloned the repo to upgrade the Python version to 3.9.0 for the windows 64 file and PyInstaller 4.0.
The changes were the two environment variables as above and Python37 replaced with Python39.
Whilst the image for docker is being created, it reaches the following point:

Collecting pyinstaller==4.0
Downloading pyinstaller-4.0.tar.gz (3.5 MB)
Installing build dependencies: started

And it gets stuck there and doesn´t continue. I have tried downgrading the python version to 3.8.5 and Pyinstaller to 3.6 and yet the issue occurs.
I have also tried manually installed PIP in the docker file to version 20.0.2 as commented in this post:

and yet no success, it hangs at the same point.

pypa/pip#8183

The Linux image gets created correctly with the above changes but it´s the windows image that fails always.
Is there something that's being done wrong?

Cheers

@historybuffjb
Copy link
Contributor

I have experienced this same problem today.

@HenriPuennel
Copy link

HenriPuennel commented Oct 15, 2020

Same issue here. I played around with permissions but that didn't change anything. I also ran "pip install pyinstaller==3.6" as an admin in cmd, which worked and successfully installed and built the dependencies. However, I ran the startup.sh file again and it got stuck at the exact same point again.
I'm also getting the following error and am unsure what it means.
=> [5/10] RUN /usr/bin/pip install pyinstaller==3.6 499.6s
=> => # 009c:err:ntoskrnl:ZwLoadDriver failed to create driver L"\Registry\Machine\System\CurrentControlSet\Servi
=> => # ces\wineusb": c0000142

=> => # Collecting pyinstaller==3.6
=> => # Downloading PyInstaller-3.6.tar.gz (3.5 MB)
=> => # Installing build dependencies: started

@mgiacopu
Copy link

mgiacopu commented Oct 30, 2020

Hi, i'm having the same issue here.
I used this repo as a base for a custom environment, just added a few lines in order to install some dependencies.

The image worked like a charm a few months ago (June/August 2020) then i always used it and it caused no problem at all.
Some days ago I had to change PC and had to build the image again. Today i tried to build it, but without luck.

It gets stuck at this point of the building process, as the other users pointed out.

Step 20/30 : RUN /usr/bin/pip install pyinstaller==$PYINSTALLER_VERSION
 ---> Running in 579b3514747a
0050:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1".
0098:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\wineusb": c0000142
Collecting pyinstaller==3.6
  Downloading PyInstaller-3.6.tar.gz (3.5 MB)
  Installing build dependencies: started

Here are some info about the docker env:

  • Ubuntu 16:04 (docker base image)
  • PYTHON_VERSION=3.7.5
  • PYINSTALLER_VERSION=3.6
  • PIP_VERSION=20.0.2

I could post the whole building process standard output, but its huge.
If you think this could help, tell me.

EDIT

  1. Also tried to use pip==20.2.2... No luck though.
  2. Tried changing multiple PCs... Still no luck.
  3. Installing the package via pip using the wheel file seems to be working. I wouldn't call it a fully functioning workaround though: when I tried to use the built docker image, pip froze while installing my project's requirements (from a requirements.txt file)... The package it froze to is backcall but i don't know if it is relevant or not (my guess is that it's unrelated). It's the second package in the requirements.txt file.

@skysb
Copy link
Author

skysb commented Nov 5, 2020

I had tried all the above to, downgrading to pip 20.2.2 and doing it in different PCs. What makes it curious is the fact that the linux builds work just fine and they are very similar in terms of functionalilty, but for some reason, maybe using wine, it fails getting the dependencies.

@lraphael
Copy link

lraphael commented Nov 5, 2020

We had the same problem yesterday. We solved it by downgrading wine from wine-testing to wine-stable.

@mgiacopu
Copy link

mgiacopu commented Nov 5, 2020

@lraphael that's it! Thank you so much! It was such a simple tweak...

@lraphael
Copy link

lraphael commented Nov 5, 2020

Yes, the solution is simple and yet it took us a few hours yesterday to understand it.

@skysb
Copy link
Author

skysb commented Nov 9, 2020

Are we sure this is the solution? I mean it did generate the dockerfile for me (after having updated the windows 64 file where python was changed to 3.9 (and its corresponding folders) and pyinstaller to 4.0), I run the docker command and get the following error::

standard_init_linux.go:211: exec user process caused "no such file or directory"
has this happened to anyone else?

@Csicso64a
Copy link

Csicso64a commented Nov 16, 2020

Can you guys help me with this ? I mean i know this is another issue but the problem is docker so i want your help.. <3

Step 18/25 : RUN /usr/bin/pip install pyinstaller==$PYINSTALLER_VERSION ---> Running in 3b1f81404379 0050:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1". 009c:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine \\System\\CurrentControlSet\\Services\\wineusb": c0000142 Collecting pyinstaller==3.6 Downloading PyInstaller-3.6.tar.gz (3.5 MB) Installing build dependencies: started

@delijati
Copy link

Tl;dr Works

We had the same problem yesterday. We solved it by downgrading wine from wine-testing to wine-stable.

Longer version:
I run into the same problem when updating https://github.com/delijati/docker-shiv from python3.6.8 to 3.7, 3.8, 3.9. Apparently in winehq-staging (same as wine-testing!?) is a bug that hangs on PIPE from one subprocess to the other.

Example code:

import subprocess

ps = subprocess.Popen(('python', '--version'), stdout=subprocess.PIPE)
output = subprocess.check_output([
    "python", "-c", 'import sys;print("".join(sys.stdin))'
], stdin=ps.stdout)
ps.wait()

print(output)

Strace:

$ sudo strace -s 99 -ffp <PID>
strace: Process 152006 attached
read(6, 

proc/stack:

sudo cat /proc/<PID>/stack 
[<0>] pipe_wait+0x6f/0xc0
[<0>] pipe_read+0x20b/0x2f0
[<0>] new_sync_read+0x122/0x1b0
[<0>] __vfs_read+0x29/0x40
[<0>] vfs_read+0xab/0x160
[<0>] ksys_read+0x67/0xe0
[<0>] __x64_sys_read+0x1a/0x20
[<0>] do_syscall_64+0x57/0x190
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

This seams pretty severe wine bug. Can someone with a wine login can report that bug https://bugs.winehq.org/ :)

@mapto
Copy link

mapto commented Jan 7, 2021

I had the same problem when trying to use Dockerfile-py3-win64.
Same solution worked by changing the current version of winehq-staging (and not wine-testing) to winehq-stable.

@azerpas
Copy link

azerpas commented Apr 19, 2022

Are we sure this is the solution? I mean it did generate the dockerfile for me (after having updated the windows 64 file where python was changed to 3.9 (and its corresponding folders) and pyinstaller to 4.0), I run the docker command and get the following error::

standard_init_linux.go:211: exec user process caused "no such file or directory" has this happened to anyone else?

Getting the same issue, have you found the issue? @skysb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants