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

installing PyQt5 error on docker image creation #44

Closed
rafonsecad opened this issue May 26, 2020 · 9 comments
Closed

installing PyQt5 error on docker image creation #44

rafonsecad opened this issue May 26, 2020 · 9 comments
Labels
priority: high priority to solve type: enhancement New feature or request

Comments

@rafonsecad
Copy link
Contributor

Error installing PyQt5 on building of the docker image

When docker is creating the image, the RUN python3.7 -m pip install -r requirements.txt step fails trying to install PyQt5.

Browsing for possible solutions, I came across with this stack overflow answer and set the version of PyQt5 at 5.14 in requirements.txt file
PyQt5==5.14 instead of PyQt5>=5.14

According to the answer, there is probably a bug in PyQt5 to Pypi.

Reproduce the issue
Steps to reproduce the behavior:

  1. checkout to dev branch
  2. docker build -t "wifipumpink3" .
  3. The following error appears:
Collecting PyQt5>=5.14 (from -r requirements.txt (line 12))
  Downloading https://files.pythonhosted.org/packages/4d/81/b9a66a28fb9a7bbeb60e266f06ebc4703e7e42b99e3609bf1b58ddd232b9/PyQt5-5.14.2.tar.gz (3.2MB)
    100% |████████████████████████████████| 3.3MB 434kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-ewyvq7f6/PyQt5/setup.py'

Expected behavior
The docker image should be created without any problems

  • Wifipumpkin3 version: 8b06498
  • Virtual Machine (yes or no and which): No
  • Operating System: Ubuntu 20.04
@mh4x0f
Copy link
Member

mh4x0f commented May 26, 2020

I had a problem with pyqt5 on docker and really only working fine the version 5.14. I 'm try to find a solution for this, maybe create another requirements.txt for only docker image. btw, this is a bug of pyqt did you say to me.

@mh4x0f mh4x0f added type: enhancement New feature or request priority: high priority to solve labels May 26, 2020
@rafonsecad
Copy link
Contributor Author

Thanks @mh4x0f for your work,
I had another issue with the requirements.txt once the docker image was created, this time with the scapy version. However this happened when I was trying to run the container and after that I had yet another error with python. Should I describe the problem I had here or should I file another issue?

@mh4x0f
Copy link
Member

mh4x0f commented May 26, 2020

describe here if the bug is only with docker

@ghost
Copy link

ghost commented May 26, 2020

This error happens with out docker too
It is not wifipumkin related its pyqt5
You can install it with
sudo apt-get install python3-pyqt5
and just remove it from requirements.txt

@rafonsecad
Copy link
Contributor Author

describe here if the bug is only with docker

Hi @mh4x0f, the other issues I had was because I was wrongly running the docker container, so there is no problem with the current scappy version after all.

@mh4x0f
Copy link
Member

mh4x0f commented May 28, 2020

@rafonsecad thank's for report, I add a fix to install the version 5.14 on docker build image

@mh4x0f mh4x0f closed this as completed May 28, 2020
@bobafouette
Copy link

Hello guys,

I had this issue yesterday during the installation. Both inside and outside docker.
I am running this on a raspberry, and applying this fixed the issue for the "regular setup".

However I do not understand why I am experiencing this during the docker build on my raspberry, does any one have an idea?

@rafonsecad
Copy link
Contributor Author

rafonsecad commented Oct 7, 2020

Hi @bobafouette,

Yes, I ran into the same issue, and I use the same fix with a normal installation. As far as I understand, raspberry runs on a different architecture(ARM) and for that reason the pyqt5 package docker was trying to install in the raspberry is not the same that the package you find in a x86 architecture.
Since using apt to install pyqt5 works, my guess is that the pyqt5 ARM package you get from pip is broken, so you could make a test and change the dockerfile to install pyqt5 from apt and not from pip and see if it works.

@bobafouette
Copy link

Happy to see I am not the only one, and your point on the architecture totally makes sense.
I will definitely try this fix on the docker install and post the results for anyone interested.
It might be a little bit off topic but, my understanding of docker Dockerfile's purpose is it's supposed to be "idempotent". To me the arch my build is running on should not impact the outcome of the process.
If we agree on this, maybe this issue could be reopened so we can find a way to make the docker setup work on rapsberry as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high priority to solve type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants