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
Related
I have been trying to install ONOS using Bazel's new version i.e., Bazel-5.1.1 in Ubuntu 20.04 LTS for mininet/containernet. I have been having issues regarding Bazel build onos command. I have searched for the installation process all over and tried as well many. But have similar issues. Is there any link or article where there is a clear step-by-step procedure to do so? I am having a task for the installation which I need to finish in a week. Any help would be appreciated. Thanks in Advance.
The error I get:
sendate#sendate04:~/onos$ bazel build onos
ERROR: The project you're trying to build requires Bazel 3.7.2 (specified in /home/sendate/onos/.bazelversion), but it wasn't found in /home/sendate/.bazel/bin.
Bazel binaries for all official releases can be downloaded from here:
https://github.com/bazelbuild/bazel/releases
You can download the required version directly using this command:
(cd "/home/sendate/.bazel/bin" && curl -fLO https://releases.bazel.build/3.7.2/release/bazel-3.7.2-linux-x86_64 && chmod +x bazel-3.7.2-linux-x86_64)
I tried doing the steps given like downloading the same version and also tried to change the version in the .bazelversion file. But nothing succeeded in Bazel build.
1.bazel —-version
If you didn’t download bazel version 3.7.x download it. If you download java version 11.You need create java default symbolic link. It will be /bar/lib/jam. . Test echo $PATH it will give ONON path. Then run sudo apt install —-reinstall build-essential. Build onos
I'm a beginner with opencv library. I've installed it on Ubuntu 17.04 and everything during the installation was perfect, no error at all.
I've installed the Opencv-master, builded it, then I downloaded the opencv_contrib-master and added it to the build folder.
I'm trying to build the scene_reconstruction using SFM (structure for motion). I've installed all the dependencies with:
sudo apt-get install libeigen3-dev libgflags-dev libgoogle-glog-dev
Then I've installed the Ceres Solver:
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
mkdir build && cd build
cmake ..
make -j4
make test
sudo make install
Everything was ok, no error at all.
I tried to write the example_sfm_scene_reconstruction.cpp following the official documentation from here (Tutorial Scene Reconstruction).
With cmake . there weren't any errors but when I try to do make I've this error:
screenshot
The english version is fatal error: opencv2/sfm.hpp: no such file or directory #include
Maybe the path is not correct or I don't know what to think.
Thanks!
You have to build the OpenCV Release together with the Contrib Release. To build OpenCV with the Contrib Repository you will have to add a parameter to cmake:
cd <opencv_build_directory>
cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>
make -j5
I recommend getting a stable opencv version (e.g. 3.3.1) as opposed to checking out the master branch. Make sure that contrib is the same version. If you are unsure at all, just follow the instructions here:
https://github.com/opencv/opencv_contrib
Also, you will need the dependencies for the sfm module before compiling opencv.
I am new to the computer and as I wanted to install Cmake instead of installing it in usr/bin or usr/local/bin I installed it in Users/Admin/Source!
Could you help me to figure out how can I change its directory or do I have to uninstall it completely?!
To install Cmake I followed the steps here http://mac-dev-env.patrickbougie.com/cmake/, except the first line.
Thanks
If you successfully went through the steps in the link you provided, cmake is now installed in /usr/local/cmake/bin.
(From what I understand you just did the download in another directory which is fine).
Since the tutorial also tells you to add this directory to your PATH it should be fine. i.e cmake should be accessible from anywhere after sourcing again your .bash_profile or simply opening a new terminal.
If for any other reason you need cmake to be in /usr/local/bin. you can create a symbolic link in this directory:
ln -s /usr/local/cmake/bin/cmake /usr/local/bin/cmake
I am currently trying to install version 3 of google protocol buffer on windows for python.
I have gone to the python folder through the command line and I am attempting to use:
python setup.py build
however I am getting the following error:
python : protoc is not installed nor found in ../src. Please compile it or install the binary package.
What's going on here?
As the error says, you must first install protoc.exe. You can get it from the Win32 package included with every Protobuf release. The latest version is here:
https://github.com/google/protobuf/releases/download/v3.0.0-alpha-3/protoc-3.0.0-alpha-3-win32.zip
(You can also build protoc from source by downloading the C++ source code release.)
I was able to solve this issue, by following the steps below:
Download the package which contains the precompiled version of Protoc from https://github.com/protocolbuffers/protobuf/releases. You will find the zip file at the bottom, in the assets section (e.g.,protoc-3.14.0-win32.zip)
Add the path of your .exe file which is located inside the bin of the Protoc folder, to the system variables of your system.
Open cmd and go to the directory where you have cloned the source code for the protocol buffer (https://github.com/protocolbuffers/protobuf). Get inside the python folder
Check if python version 2.7 or newer is installed by running the command python -V. If yes then try the command, python setup.py build
python setup.py install
check the installed protoc version with protoc --version
I'm trying to install Boost for c++. Since I use cygwin (on Windows 7) I follow these instructions for Unix.
I start by downloading boost_1_55_0.zip from sourceforge. The instructions tell me to run tar --bzip2 -xf /path/to/boost_1_55_0.zip but this doesn't work (probably because the downloaded file is .zip and not .tar.bz2; I can't find the latter anywhere to download), so instead I use winrar and unzip it into /usr/local.
After this the header-only libraries work fine, but I need the ones where a build is necessary.
The instructions tells me to go to the boost folder and run./configure --help, but this doesn't work; I get the message -bash: ./configure: No such file or directory. So I locate the file configure in the folder /usr/local/boost_1_55_0/tools/build/v2/engine/boehm_gc, go there and try again, and this time it works: I get the help for configure.
I then try to run ./configure --prefix=/usr/local/boost_1_55_0 --enable-cplusplus but get the error message configure: error: cannot run /bin/sh ./config.sub. I try it with only one or none of the options too but that doesn't help.
Any ideas?
I don't know what guide you're following, but to install boost I have done:
cd boost
./bootstrap.sh
./b2
./b2 install
stop
As report boost doc:
If you plan to build from the Cygwin bash shell, you're actually
running on a POSIX platform and should follow the instructions for
getting started on Unix variants. Other command shells, such as
MinGW's MSYS, are not supported—they may or may not work.