This will be my first question. I have searched through the other questions but unfortunately none of them solved my problem(s).
I'm running 32-bit Python (2.7) on Win7. I want to install the PyQt4.
I have downloaded PyQt-win-gpl-4.11.4.zip and PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe files in: https://riverbankcomputing.com/software/pyqt/download link. It is written there: "Before you can build PyQt4 you must have already built and installed SIP". Hence, I downloaded "sip-4.16.9".
I followed those steps during the installation: http://pyqt.sourceforge.net/Docs/sip4/installation.html. I successfully executed configure.py script. However, when I tried to build SIP by running the make command, I have an infinite loop like given below:
C:\Python27\sip-4.16.9>make
cd sipgen
make
make[1]: Entering directory '/c/Python27/sip-4.16.9'
cd sipgen
make
make[2]: Entering directory '/c/Python27/sip-4.16.9'
cd sipgen
make
make[3]: Entering directory '/c/Python27/sip-4.16.9'
... and so on endless
How can I solve this problem?
Thanks in advance.
Usually I install PyQt4 via Christoph's excellent site.
I tried:
C:\Users\user\Downloads>pip install instPyQt4-4.11.4-cp27-none-win_amd64.whl
but it told me my system isn't supported. Doing the same for the 32bit one resulted in the same error.
So I tried from source and hit the same problem in this question. After reading the 64bit problem highlighted by ekhumoro I realized that the python downloads page seems to download 32bit by default even though my OS is 64bit. Python2.7 64-bit is available here. What I did is uninstall the 32bit one fist so that the 64bit one can take its place (no need to set up envirnment variables again). After this I tried installing the .whl agani as shown above and this time it worked.
When the same problem occurred, I was able to solve the problem.
python configure.py --platform win32-g++
mingw32-make
mingw32-make install
However, the next step is still unclear.
Related
Right now, I am tring to build Chromium on my own computer under instructions at https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md#Build-Chromium
At first, it went smoothly. However when I run
$ autoninja -C out/Default chrome
when I run this to start build. It started. And then an error occured and the build process is terminated.
The error is
NameError: name 'unicode' is not defined" and I know it is a common error associated with the difference between python2 and python3.
However, I don't know how to let the ninja use only python2 and avoid this bug.
If you can help me, I will really appreciate it.
I recently ran into this issue when attempting to home build the Brave browser, which is chromium based. It appears that chromium build is based on python2, which is fine, but uses plain calls to "python" in the scripts. Obviously, essentially all modern distros put a symlink to python3 at python in the PATH (generally /usr/bin/python -> /usr/bin/python3). I still retain hope that there is a way to configure the "python path" in the build system, but have not found it and I am not too familiar with ninja.
The first way I "solved" this, and managed a successful build is one I consider a hack and do not recommend as a solution without the stipulation that it leaves your system broken so don't run too many other things. This is to manually temporarily update the symlink. Assuming you have both /usr/bin/python2 and /usr/bin/python3 on your system, remove the symlink at /usr/bin/python and replace it with one to python2:
sudo rm /usr/bin python
sudo ln -s /usr/bin/python2 /usr/bin/python
You can then run the chromium build, and reverse the above change when completed. Note that anything on your system that requires python3 to be at the symlink python cannot be run during this time. I have successfully used this technique to build Brave (and then reverse the change after the build completed).
I can offer you some other options too. One is to set up pyenv. If you search for that, you will find it is a suite that allows you to manage multiple python versions and have different directories use different ones. I researched this, and assume it can work, but have not done it myself.
The next option, which I am currently undertaking right now, is basically a manual watered down version of what pyenv does. I will let you know how it goes. The essence is to add a symlink in the path that will redirect python calls for that instance of the shell (and all subshells it creates). Assuming you are in the source directly at the obvious path:
mkdir .shims
ln -s /usr/bin/python2 .shims/python
export PATH=/home/yourname/src/Chromium/.shims:$PATH
python --version
This should print out whatever version of python2 you have rather than python. Anytime you come back to work here, you have to export the new PATH again. The rest of your system is unaffected, and still finds python3 at python. You can open up a new terminal and type python --version to verify that.
I have Chromium building on Fedora 33. Somewhere in the Chromium build, /usr/bin/python is getting run explicitly. On Fedora, that means Python 3.
If you change /usr/bin/python to point to python2.7, I bet your build will work.
Creating aliases for "python" won't work.
If this works, consider using the alternatives command to easily change /usr/bin/python:
alternatives command for /usr/bin/python
I want to embed the python script in my c++ Qt application, By searching on the net I found that PythonQt is exactly what I am looking for but when I went to it's github repo there is build description given for windows system but not for ubuntu system so after cloning the repo if I include it's src in my Qt .pro file it gives me output that
Python.h not found, I think the reason is that I didn't build it in my system. Is there anyone who could tell me that how to build PythonQt in ubuntu. The link for their repo is this: https://github.com/MeVisLab/pythonqt
If this didn't work you can also suggest me some other thing which will help me to embed python scripts into my Qt c++ application.
First clone the repo by using the following command
https://github.com/MeVisLab/pythonqt.git
After that cd into the clone folder and execute the below command to build it into your system.
qmake
This command will generate the MakeFile into your current directory run the following command to completely build the PythonQt in your system.
sudo make all
sudo make install
While executing those commands if you get the following error
fatal error: 'private/qmetaobjectbuilder_p.h'
Run the below command to solve this
sudo apt install qtbase5-private-dev
I've downloaded dicom3tools in Ubuntu apt-get install dicom3tools, but certain apps are not present.
I've downloaded the source and compiled according to directions on Ubuntu without errors. I have access to most of the apps in the kit, but some just seem to be missing or not compiling.
I need a working binary copy of the pbmtoovl tool from this kit.
Can anyone help me?
Do you know why it is missing?
Do I need to compile differently?
Do you have a copy of the pbmtoovl app pre-compiled?
There is no info on this anywhere on the web, I have nowhere else to turn.
Thanks in advance for any info on this.
Please please help me with this.....
I edited the proper file with a uid.
I ran
imake -I./config -DInstallInTopDir -DUsemyID
and everything looked fine.
make World.
make install
make install.man,
but still no rawtodc or pbmtoovl or any of the dicom creation tools. I really need these tools. Please let me know what I'm doing wrong. On Ubuntu 14 –
I am the author of the dicom3tools debian package. The explanation is given online here.
When you install a debian package, you are required to read the documentation. In this case the documentation was available on your system from:
$ cat /usr/share/doc/dicom3tools/README.Debian
So you'll need to follow the build instructions yourself (see INSTALL):
Edit config/site.p-def to set your UID root (a la UseClunieID, to be
selected with a UseXXXXID define on the imake command line).
NB. Don't ever use any UseClunie*ID or your instances
will conflict with mine !
./Configure
setenv IMAKEINCLUDE -I./config # only needed for suns
imake -I./config -DInstallInTopDir -DUseXXXXID
make World
make install # into ./bin
make install.man # into ./man
I finally did a fresh Ubuntu install, installed xutils, g++, gcc and ran the compiling instructions. It did not install, again, but this time I did have a new directory in bin ending in 'unknown' that miraculously contained all of the compiled binaries. I added that dir to the PATH and VOILA I can access all the tools from the command line....
It's still a problem, but I can now use pbmtoovl
I just installed SDL2, and am having a bit of trouble getting some of the test examples to run, specifically testgl2.c, which can be found in the test directory of the SDL2.0.0 source.
At first, I did my ./configure; make; sudo make install, then went to the test directory and ran make. It failed part way through, but the testgl2 executable was still built. When I ran it, I receive the error "No OpenGL support on this system.". Looking into the source, it looks like HAVE_OPENGL is not getting defined.
I found this thread which told me to install libglu1-mesa-dev, and this thread which also said to install freeglut3-dev and mesa-common-dev. I installed all of these, ran a make clean for the SDL installation, and did the ./configure; make; sudo make install, remade the test, but I still receive the same error message when running testgl2. I did noticed that the line
checking for OpenGL (GLX) support... no
changed to yes after I installed the packages.
I'm on Ubuntu 13.04, with an integrated graphics card.
At first, I did my ./configure; make; sudo make install, then went to the test directory and ran make.
I think you missed a step.
Do the top-level configure/make/make install, then repeat for the configure script in the test directory.
It looks like only test/configure will generate a Makefile with HAVE_OPENGL.
I am trying to install Qt 4.6.2 on ubuntu. When I run the configure script I get the following error message "You don't seem to have 'make' or 'gmake' in your PATH. cannot proceed".
On echo of the PATH variable I get
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
on running the command
$which make , I get
/usr/bin/make
How do I proceed with this issue? I seem to have the make in the path env variable but still the config script throws cannot find make or gmake?
It not the problem of make or gmake, nor PATH, Just because you unzip the tarball without -a option. so, to solve this problem, just use 'unzip -a *.zip', it will be fine.
I recently encountered this error in a fedora32 docker container, because the which utility was not installed. I was compiling Qt 5.12.9.
dnf install which fixed the problem.
You should have been installed build-essentials but did not restart try either to restart or type:
export MAKE=/usr/bin/make
and make sure with echo $MAKE
I downloaded the source again. I am able to run configure without any problems. Seems like there was an issue with the earlier source.
you should install build essentials
sudo apt-get install build-essential
and typesudo apt make install