Struggling to build SIP for PyQt4 - python

Basically, trying to build SIP so that I can install PyQt4. I manage to use
python configure.py
That is completely fine - I get the sipconfig.py file.
Problem comes when I try to build. It won't recognise make. I've tried to get Visual Studio to do it - but that just made me really confused. Any suggestions would be really good - I've tried other solutions and nothing seems to work.
So yeah, any help would be great!

You need to install MinGW , and then set your path to include mnGW and use: mingw32-make and mingw32-make install
The full detail of this process can be found in Python web manual

Related

Keeps saying that Python is not found and that I need to install it on Microsoft even though I got the extensions?

I am very much a new person to coding and I was primarily trying to do something for some browser game I play. This message is what I am most concerned of: "Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases." I've looked at countless videos and articles but cannot find anything that is of use for me. I don't know if this has been an issue for anyone else or has been asked of and I use Python. Could someone please help me? I also use Windows 10 with the newest version possible (3.10.6).
https://i.stack.imgur.com/Soiiw.png
Can you please reinstall the python
when installing make sure to check add python 3.10.6(your version) as Path
and in your code you hace to use this code to import emoji library also
pip install emoji
hope it helps:)
For me, turning off Python under "Apps > App Execution Aliases" in Windows 11 settings fixed it.
Fix Python for Stable Diffusion on Windows 11

install opencv from source windows

I am trying to install OpenCV following this link https://docs.opencv.org/master/d5/de5/tutorial_py_setup_in_windows.html
opencv-4.5.1 is the version I am building from source. I have no errors in my entire process( up to Step 16)
Step 17 which INSTALL also has no errors, but Step 18 'import cv2 as cv' will not import this module.
I have python 3.9.1. I followed all the steps with CMAKE and was able to generate with no errors.
Is there something that I am missing here?
I would recommend to use another IDE like Pycharm to create your projects. It is extremely easy to setup an OpenCV work environment :).
IDLE is great for smaller projects but I`ve seen a lot of people having issues with it.

How to install Python on Windows 10

I have uninstalled Python and now I cant install it anymore (error 0x800705b4). Has anybody encountered this error ? I have tried different versions but nothing works.
You can try Anaconda for Windows which has seperate environments.
The solution I would recommend though is to use WinPython, which after install is just a folder with everything you need, doesn't change a thing in your windows environment and still works great! There is also a version that comes with the most used packages already installed, give it a try!
No need to mess with environments, just use a different WinPython folder for your projects!
Got the same error after a little digging I found the below thing...It works like a charm...
First...Make sure to check the setup package for your system which is X86 or x64, download packages based on the system before you proceed, otherwise, the hack won't work. The below is explained for x64 bit windows 8.1 system with a 64 bit Python setup package use the below-mentioned setup name(.exe file) in Step1: and search in google for downloading the Python setup
Start CMD as Admin, after that
Step1: ~YourFilePath/python-3.5.0-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
Step2:
~YourFilePath/python-3.5.0-amd64.exe
~YourFilePath stands for the location of the python-3.5.0-amd64.exe file on your PC Example: E:\Softwares\python-3.5.0-amd64.exe
now after executing Step2: the setup will run without any errors..... Cool...
The above-mentioned steps should work or else If you find any difficulties please visit here which explains the process in detail. Good Luck...
Credits to this answer
Eventually what did the trick for me was to roll back the previous microsoft update (KB4512575)

eric6 can't compile in Python form (could not start pyuic5.exe)

I am trying to create a GUI using eric6 for a Python script I coded recently, however when I right click in eric6 on the new *.ui file I create and I try to compile it (choosing 'Compile Form'), the following error is displayed - could not start puyic5.exe:
I have tried the (very few) online solutions but without any luck (for example, checking that in the pyuic5.bat file, the mentioned directory is without any space, and also tried to re-install Qt5). Furthermore, even though both Python and PyQt are correctly installed, pyuic5.exe is missing in the directory specified in the error. Also, everything seems setup ok in the PATH in the system environmental variables.
Versions info:
Python 3.4.5
Qt 5.4.1
PyQt 5.4.1
eric6 17.06
EDIT: if it can help debugging my issue, I would like to add that if I open a command prompt and I invoke pyuic5 mainform.ui -o mainform.py it works without problems. Instead, in eric6, such error message is generated.
Thank you in advance for any precious help and guidance you may offer !
Sincerely,
Paolo
Solved downgrading to an older version of eric6 (precisely to v 17.04.1). Thought it might be useful to share in case somebody encounters the same problem.

Installing PyQt4.11.2 on Scientific Linux 6.5

I know this is probably something trivial, but I cannot seem to find the answer. I have just completed a fresh install of Scientific Linux 6.5 - which ships with Python 2.6 and Qt 4.6.2. I wish to use the Python interpreter python2.7.8 so downloaded this and installed. I use the QtDesigner for ease when making guis, so then need the PyQt bindings to go with it. I therefore downloaded SIP-4.16.3, configured with:
python2.7 ./configure (in the sip download directory)
to make the bindings for the newer version of python. Everything works fine so far.
I then try to install PyQt4.11.2 in the same way:
python2.7 ./configure --qmake=/usr/lib/qt4/bin/qmake -g (to pick up the qt4 version of qmake with static qt libraries)
the configure script completes fine, but I get the following error during 'make':
error: ‘PrintCurrentPage’ is not a member of ‘QAbstractPrintDialog’
..../Downloads/PyQt-x11-gpl-4.11.2/QtGui/sipQtGuiQAbstractPrintDialog.cpp:1787: error: too many initializers for ‘sipEnumMemberDef’
make[1]: * [sipQtGuiQAbstractPrintDialog.o] Error 1
make[1]: Leaving directory `..../Downloads/PyQt-x11-gpl-4.11.2/QtGui'
make: * [all] Error 2
I am at this point a little lost and have been bashing my head for a while, it must be something simple I have missed, any help would be great.
Thanks in advance
Search string 'PrintCurrentPage' in files of your PyQt-package. You will find it in 4 files.
Remove corresponded lines with string 'PrintCurrentPage'
I know this thread is old, but I ran into a similar error installing PyQt4.11.4 by source on a Red Hat Enterprise Linux 5 machine.
I ended up adding the members 'PrintShowPageSize = 0x0008' and 'PrintCurrentPage = 0x0040' to the class definition of QAbstractPrintDialog. This C++ class definition is located in the header file qabstractprintdialog.h. On my distribution, this was located in /usr/lib64/qt4/include/QtGui/.
After adding those missing members, I re-ran make with no compile errors.
The only reason I stumbled onto this solution was looking at this version of qtabstractprintdialog.h here. I noticed my version of the header file was missing those members in the QAbstractPrintDialog class.
I haven't put the new PyQt4 install to use yet, so I can't vouch for functionality just now. But it did compile/install!

Categories

Resources