Installing pyQT on OSX for python 3.2 - python-3.x

NOTE: I'm using python 3
I've been trying to install pyQT on Mac OsX Mountain Lion and I have not had much success so far. I'm fairly new to this so I don't even want to think about setting everything up manually.
Heres the error Im getting which I believe means that there is no easy_install script for installing pyQT. Ive also tried macports however pyQT is not supported for python3 yet on that. Does anyone have any simple solution to getting pyQT installed on osX?
Downloading http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.9.5/PyQt-x11-gpl-4.9.5.tar.gz
Processing PyQt-x11-gpl-4.9.5.tar.gz
error: Couldn't find a setup script in /tmp/easy_install-ZiD0mx/PyQt-x11-gpl-4.9.5.tar.gz
new-host-6:~ Eric$
macports just gives the error "port install not found"

I don't have specific instructions, but here is an overview of what you need
Install Qt: Either via macports, homebrew, source, or a binary build.
Install sip from source
python configure.py --arch=x86_64
make && make install
Install PyQt4 from source. You want the mac source. Not X11 (linux)
python configure.py
make && make install
PyQt4 should locate sip and your Qt install.
You cannot simply install it from easy_install because it is a bit more involved. PyQt depends on SIP and a Qt installation for linking. I recommend homebrew over macports for package installing. You can use it to get Qt: brew install qt

Related

Is Kivy installation possible today without building your own wheel?

This link
shows that in order to install Kivy with python3.11, you must build your own "wheel". Unfortunately for me, the above install fails at the "make install" command. "which python" seems to confirm that i am in the correct virtual environment, but i am not certain.
So we know for sure that if, as of today, you have the most recent version of python, which is python3.11, then you must build your own wheel for Kivy.
That stackoverflow link doesnt work for me, so I thought, well I will just install python3.7 or python3.8. Unfortunately www.python.org does not have installers for versions lower than 3.9. www.python.org does have python3.7 and python3.8 available but those versions do not have "macOS 64-bit...installer" available for them. i am reluctant to try a python install manually without the installer.
my reading of the Kivy documentation confirms that Kivy is happy with python3.7 or python3.8.
So for me, because I want to use a python version that has an installer on www.python.org, I cannot install Kivy without building my own wheel. And that installation fails for me.
Any advice?
The answer is YES, Kivy installation is possible today without building your own wheel. Use python3.10 as of today, February 8, 2023. Kivy wheels are already built for phthon3.10. I installed Python3.10 from www.python.org on my mac laptop running Monterey 12.6. Then I followed the Kivy install instructions at www.kivy.org. The instructions worked perfectly and now I can run Kivy apps from the command line. Next step is to synchronize my python IDE with the environment variables that were used to install Python3.10 and Kivy.

ERROR in install opencv in my python 3.6.6

I HAVE PYTHON 3.6.6 INSTALLED IN MY WINDOWS 7 PLATFORM BUT WHEN I TRIED TO INSTALL OPENCV PACKAGE IT SAYS REQUIREMENT ALREADY SATISFIED AND IF I TRY TO IMPORT CV2 IT SAYS NO MODULE .I'VE TRIED ALL POSSIBLE METHODS ON INTERNET WHAT SHOULD I DO
i tried to download opencv exe from sourceforge and copying cv2.pyd file and then pasting it in site packages
i tried pip install opencv_python-4.0.1-cp37-cp37m-win_amd64.whl
but nothing works
The error message says that you are asking PIP install a version of cv2 for 64-bit Python 2.7, and that installation is failing. So the installation is not happening because it's the wrong version. That might be because you don't have Python 2.7, or because you have a 32-bit processor, or both. Navigate to Python36\Scripts and issue the command pip install opencv_python. Then pip will find the appropriate file to download, and install it.

Can't install PyQt4

I'm trying to install the latest version of PyQt4 for windows. Riverbank doesn't provide binary installer anymore. I downloaded the source package and when I try to follow the instructions by running python configure.py I get an error message that I need SIP 4.18 or later version to be installed. I try to install sip using pip3 install sip (as it's explained here: https://pypi.python.org/pypi/SIP/4.19), but it fails to install.
Would you please help me in this?

Can I install the Ubuntu SDK along side with PyQt?

I installed the Ubuntu SDK and everything goes very well. Now I want to install PyQt just to mess around with it. PyQt comes with Qt Creator, but it was already installed by the Ubuntu SDK. How can I install PyQt in this conditions?
1) QtCreator is a Qt/C++ developing IDE, so you may already have Qt intalled.
2) Downloads the corresponding's Pyqt, for example, if you have already 4.8.10 Qt installed, then try to download the PyQt 4.8.4.
3) Follow the readme instructor to have it installed.
If you use apt-get you could just use the command:
sudo apt-get install python-qt4
To test that this worked, open the python console and enter:
from PyQt4.QtGui import *
If this does not give any errors, it worked!

Installing OpenCV for Python in Ubuntu 12.04. No module present in dist-packages or site-packages?

Following the steps given here, i have completed the installation process, however Python (IDLE) is giving me an ImportError. For which the guide suggests :
Python may return to you an error like "No module named cv" The trouble is that the python module is installed in /usr/local/lib/python2.6/site-packages. But, on Debian and on Ubuntu, Python only looks in /usr/local/lib/python2.6/dist-packages
You can fix it using three ways (Use only one of those, the first is the best):
move the cv.so file from the site-packages to the dist-packages:
sudo mv /usr/local/lib/python2.6/site-packages/cv.so /usr/local/lib/python2.6/dist-packages/cv.so
However, both the site-packages as well as dist-packages, for both 2.7 and 3.2 are empty.
What went wrong and how do i solve it ?
I solved the problem by installing all the packages and dependencies again using the Software Center. OpenCV Python bindings are available for OpenCV 2.3 and Python 2.7 directly from the software center which I used the second time.
OpenCv python bindings for 3.2 are not available for 12.04. They are being developed for Raring (Ubuntu 13.04) only. Hence, the solution is to use either backports, or to use OpenCv on Python 2.7
Backports also have a problem as they are available only for 32 bit OS systems and not 64 bit.
So, the only safe and stable way to run OpenCV Python on Ubuntu seems to be using OpenCV 2.3 on Python 2.7
I also get the empty dist-packages folder with OpenCV2.4.4 and Ubuntu 12.04. It turns out that I need to install python-dev and python-numpy in order to make the cv.so compiled into the dist-packages.
sudo apt-get install python-dev python-numpy
After that, using cmake to build OpenCV again and everything will be fine
UPDATE
it depends on your system pretty much.
On my Lion (10.8), I have java installed, and openCV complaints about cannot build the unit test and stop at 92%. It turned out that I have to manually create the build folder and put the junit jar into the lib folder in order to let opencv compile all the test case. After that, everything is ok
On my ubuntu (12.04, fresh installation with build-essential and all packages are up-to-date), eveything is compiled fine, except that "No module named cv" and there is not cv.so in the dist-packages and site-packages. Searching around and then finally, it turned out that I have to have python-dev and python-numpy

Resources