pypa / pip

The Python package installer
https://pip.pypa.io/
MIT License
9.51k stars 3.02k forks source link

[SOLVED] Unable to install PyQt5 on FreeBSD 13.1 #11286

Closed wendijohanes closed 2 years ago

wendijohanes commented 2 years ago

Description

Can't install latest PyQt5 using pip OS: FreeBSD 13.1 Python 3.7 - Python3.9 Latest QT version on FreeBSD system all system and packages already updated to latest version

Tried using --no-cache-dir option, still no luck. Tried various python version from 3.7 to 3.9 Every time I execute pip install PyQt5, process always "freeze" on Preparing metadata (pyproject.toml) .. step (cursor not spinning like usual)

After I open task manager, this process hoggs RAM no matter how much ram I have, this process always eats up available RAM/swap IN MINUTES After I run out of RAM/swap, installation process killed automatically----> Preparing metadata (pyproject.toml) .. killed

Expected behavior

No response

pip version

22.2

Python version

3.9

OS

FreeBSD 13.1

How to Reproduce

  1. Open FreeBSD terminal (bash)
  2. Create Virtual Environment, virtualenv -p python3.9 TESTENV
  3. Activate virtual environment, source TESTENV/bin/activate
  4. Show package version, pip list
  5. Install PyQT5, pip install PyQt5

Output

No response

Code of Conduct

uranusjr commented 2 years ago

PyQt5 requires a lot of resource to run, it’s likely not something pip can do. You probably need to ask for advices from PyQt maintainers https://riverbankcomputing.com/support/pyqt

wendijohanes commented 2 years ago

PyQt5 requires a lot of resource to run, it’s likely not something pip can do. You probably need to ask for advices from PyQt maintainers https://riverbankcomputing.com/support/pyqt

I used to be able to run install it via pip in the past.. I can install it on Linux tough, but for now I have problem on FreeBSD system

sbidoul commented 2 years ago

@wendijohanes does it work with pip 22.1.2 on the same FreeBSD system ?

RonnyPfannschmidt commented 2 years ago

Based on the wheels provided by the upstream it seems like only Linux has first class support

Is there actually a way to publish bsd builds of wheels on pypi?

wendijohanes commented 2 years ago

@wendijohanes does it work with pip 22.1.2 on the same FreeBSD system ?

It doesn't work with basically every PyQt5 >= 5.15.0 Tried with various pip and python version, still throttling my RAM

I tried installing PyQt5 == 5.14.2, It didn't eat my RAM, but compilation process failed (It was expected tough since I have latest qt on my system) but with every PyQt5 >= 5.15.0, it always eats up RAM, no matter how much RAM i have

I used to be able to install PyQt5 it via pip in the past, I know it was time consuming, but It didn't eat my whole RAM as I remembered it. Luckily, I only have one mini application built with pyqt5. I am switching to Qt5 C++

sbidoul commented 2 years ago

From your explanation it seems more likely that the issue is due to a change in PyQt5 than in pip, so there is not much we can do to help here.

pradyunsg commented 2 years ago

Please reach out to the maintainers of PyQt for assistance.

wendijohanes commented 2 years ago

From your explanation it seems more likely that the issue is due to a change in PyQt5 than in pip, so there is not much we can do to help here.

Finally, I was able to install it by building it from source: sip-install --verbose --target-dir ~//lib/python3.9/site-packages --no-dbus-python --no-designer-plugin --no-qml-plugin --qt-shared

https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html Thank you for all your reply and support

wendijohanes commented 2 years ago

PyQt5 requires a lot of resource to run, it’s likely not something pip can do. You probably need to ask for advices from PyQt maintainers https://riverbankcomputing.com/support/pyqt

https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html I solved it by building it from the source. Thank you for pointing PyQt maintainer's url

uranusjr commented 2 years ago

Is there actually a way to publish bsd builds of wheels on pypi?

No. There was a discussion somewhere else and iirc the conclusion(?) was

  1. We need someone to write a PEP for a platform tag (similar to ManyLinux but likely a lot simpler, see below)
  2. We don't want a "ManyBSD" tag but likely a tag for FreeBSD and NetBSD since they are sufficiently different platforms it does not make sense to generalise.
  3. It may be possible to generalise somewhat (say let DragonBSD use FreeBSD wheels) but someone needs to look into those things.
  4. Not too many people are really that interested in this.
wdormann commented 2 years ago

FWIW, attempting to install PyQt5 via pip on an aarch64 Ubuntu Linux box has the same results. All RAM is eaten up until the process is killed. The PyQt-builder + source tarball + sip-install alternative works just fine, without any excess memory usage at all. Screen Shot 2022-07-25 at 3 53 04 PM