Getting install_pyuic5 error during PyQt5 install - qt

I have built source files for installing PyQt5 but when I executed sudo make install, after a while, it prompts this error message:
sudo make install
.
.
.
install -m 755 -p /home/bora/Desktop/PyQt-gpl-5.4.1/pyuic5 /usr/bin/
strip /usr/bin/pyuic5
strip:/usr/bin/pyuic5: File format not recognized
make: [install_pyuic5] Error 1 (ignored)
How can I fix this problem? I am using Qt 5.4.1 and I am sure that I have properly set the path to Qt5's qmake. If I didn't, it would gave me an error during compilation of source files. Do I need to install any dependecy for PyQt5 another than SIP?

I incurred in the same problem after following this link:
https://michalcodes4life.wordpress.com/2014/03/16/pyqt5-python-3-3-in-virtualenv-on-ubuntu/, I managed to narrow the errors down to the one you're reporting.
Notice in the link where it mentions to run configure.py with the -verboseflag:
python configure.py -verbose --qmake /path/to/Qt/5.2.1/gcc_64/bin/qmake --sip-incdir=/usr/include/python3.3m
Go through the stacktrace and see if the error you reported is the only one. If that is so then ignore it as it's just a "warning" in Python parlance. In your command line enter:
import sip
import PyQt5
should give no errors.

It's not really an error, so you can safely ignore it (just as make did).
The output is coming from the strip command, which is mainly used for removing debugging symbols from binaries. However, /usr/bin/pyuic5 is a shell-script rather than a binary, and so strip cannot process that file. As a consequence, it outputs a warning message and returns a non-zero exit status. The make process sees this, but has been configured to ignore it, and so there is no fatal error.

Related

conda is not not able to create env, not activating env and also jupyter is not working

I am getting this error I am just playing with Linux commands and I noticed a change suddenly that my conda is not responding so I cannot able to activate my env, make new env, or open Jupiter notebook. I have many projects in my system so how to mitigate this error
before this error when everything is right I always have a (base) name in front of my terminal like the below one
(base)rahul#linux:~$ conda
but now I am getting this only with errors
rahul#linux:~$ conda
Could not find platform independent libraries
Consider setting $PYTHONHOME to [:<exec_prefix>]
Fatal Python error: initfsencoding: Unable to get the locale encoding
LookupError: no codec search functions registered: can't find encoding
Current thread 0x00007fad7aed0740 (most recent call first):
Aborted (core dumped)
if I uninstall and reinstall conda what happen to my env then I am in fear
I had the same error but on a plain Debian 10, without conda (and without action on my part).
Python3.5 was working well but python3.7 (linked to python3) was crashing with the same error. I tried every PYTHONPATH I could think of, but nothing worked, and I don't think it could do anything because python3 -vvv shows that the encoding package is well found and imported.
Then I thought it was my locales. (some pretty interesting infos here https://vstinner.github.io/python37-new-utf8-mode.html but didn't found my answer)
At the end all I could do to fix it, was to reinstall python3.7 from source (with apt it didn't work), and then reinstall all needed packages. (if you're missing lsb_release check this answer : it's in /usr/share/pyshared)

Build a QT program from command line

I know this question has already been asked, but I encounter an issue that I haven't seen elsewhere.
I am trying to build automatically a QT program on Jenkins through a JenkinsFile.
So I want to build this program in command line.
On Qt Creator, everything works fine, my makefile is generated and the program compiles.
But when I manually type the exact commands that are executed in Qt on a terminal (cmd and cygwin), the compilation fails.
The errors are usually ld: cannot find -lXXXXXX
My guess is that it is an environment problem so I tried to add some lib paths in the $PATH, $LIBRARY_PATH, and $LD_LIBRARY_PATH variables but it doesn't resolve the problem. The error just becomes Undefined reference to ___XXXXXX
I would appreciate some help on this issue !
Thanks.
EDIT
The building (slave) machine is a windows 7. Here is a screenshot of the compilation stage in Qt (which works fine). The commands I try to type in a terminal are exactly the same as the blue lines on the screenshot. (sorry some lines are written in French)
From the error message ld: cannot find -lXXXXXX and the environment variables, I would suppose that you are compiling in Linux/Unix. Now, if you are compiling with g++, the environment variables $PATH, $LIBRARY_PATH, and $LD_LIBRARY_PATH won't have any effect on finding libraries. What you may try is an -L argument to the compiler telling it where the library is located, I mean:
g++ -L /path/to/libXXXXX.so -l XXXXX -o result source.cpp

Installing Python modules

I am trying to install the pyperclip module for Python 3.6 on Windows (32 bit). I have looked at various documentations (Python documentation, pypi.python.org and online courses) and they all said the same thing.
1) Install and update pip
I downloaded get-pip.py from python.org and it ran immediately, so pip should be updated.
2) Use the command python -m pip install SomePackage
Okay here is where I'm having issues. Everywhere says to run this in the command line, or doesn't specify a place to run it.
I ran this in the command prompt: python -m pip install pyperclip. But I got the error message "'python' is not recognized as an internal or external command, operable program or batch file.
If I run it in Python 3.6, it says pip is an invalid syntax. Running it in IDLE gives me the same message.
I have no idea where else to run it. I have the pyperclip module in my python folder. It looks like a really simple problem, but I have been stuck on this for ages!
You need to add the location of the python.exe to your $PATH variable. This depends on your installation location. In my case it is C:\Anaconda3. The default is C:\Python as far as I know.
To edit your path variable you can do the following thing. Go to your Control Panel then search for system. You should see something like: "Edit the system environment variables". Click on this and then click on environment variables in the panel that opened. There you have a list of system variables. You should now look for the Path variable. Now click edit and add the Python path at the end. Make sure that you added a semicolon before adding the path to not mess with your previous configuration.

How to regenerate configure file using autoconf?

I use autoconf to regenerate the configure file, it works. But when I execute the generated configure file by ./configure, there are some error messages like
./configure: line 3713: syntax error near unexpected token `blas'
./configure: line 3713: ` withval=$with_blas; R_ARG_USE(blas)'
I googled and found that blas is a library, but it still gives the error messages after installing. I have the autoconf with version "autoconf (GNU Autoconf) 2.69" installed on my Mac, and what I am trying to compile is the R source https://svn.r-project.org/R/.
I have run both autoconf -f and autoreconf -f to try to regenerate configure file which has been generated successfully. But, when I run ./configure the error happens again.
The error messages say syntax error near unexpected token blas and withval=$with_blas; R_ARG_USE(blas). I think the problem maybe the unknown function R_ARG_USE. I grep R_ARG_USE in the code base and find that it is defined in the file m4/R.m4:
AC_DEFUN([R_ARG_USE],
[if test "${withval}" = no; then
use_$1=no
else
use_$1=yes
fi
])# R_ARG_USE
Does that mean when I am running autoconf or autoreconf I miss something to let it know the existence of m4/R.m4 ?
I have been stuck here for almost three days, any helps will be appreciated. Thanks a lot.
It seems I have solved this problem. I reinstall the gnu m4 using brew install m4 and the problem solved.
After running autoreconf -i -f, I can get the correct configure file and the R source can be compiled.
Maybe it's the wrong version m4 I have got in Mac.

Cygwin error message -- binary file not executable

So I am trying to install a program on my windows machine that required me to install Cygwin to install it. So I am working from a README file and assueme I have compiled the code previously correctly (its one line sh build.sh) and when actually trying to use the program I get the following error:
BabakP#Babak /cygdrive/c/Users/BabakP/Desktop/test
$ ./Runlock input.tst output.tst 1
./Ostrich: Exec format error. Binary file not executable.
I guess I am trying to figure out why I am getting this error so any suggestions on how to troubleshoot it would be great!
./Ostrich is a Mac executable. It can't be executed under Cygwin. (A MacOS emulator that runs under Windows or Cygwin is theoretically possible, but I don't know of any such thing.)
Without knowing the details of the software you're trying to install, it's hard to say how or whether you can fix it.
You may be able to rebuild Ostrich from source (if you have the source, and if it's not MacOS-specfic).

Resources