Reputation: 11
We are trying to build the last version of Qt ( qt-15.5.0 )
from the sources on Ubuntu 20.04
. Everything is running fine until we get the following error:
Project ERROR: Building QtQml requires Python.
Python is avalaible ( version 3.8 )
, we even tried alias python=python3
and adding the path to python to $PATH
but it didn't help. We can't find any info on this specific problem.
What we did:
$ wget http://download.qt.io/official_releases/qt/5.15/5.15.0/single/qt-everywhere-src-5.15.0.tar.xz
$ ./configure -prefix /username/dev/libraries/qt-5.15.0/install -xcb
$ make -j8
$ sudo make install
Upvotes: 0
Views: 2206
Reputation: 63
Whilst manually setting the alias is a quick workaround, and it helps in many cases, this solution is less useful when dealing with systems that are managed in an automated fashion.
In order to come around this issue, in Ubuntu 22 at least there is a meta-package available, which solves the issue:
sudo apt install python-is-python3
Other distros may possibly have similar solutions readily available.
Upvotes: 4
Reputation: 48
$ vi .bashrc
Add the following alias to the .bashrc file.
alias python=python3
Save it and source the script.
$ source .bashrc
If it didn't work, use
$ which python3
/usr/bin/python3
$ sudo cp /usr/bin/python3 /usr/bin/python
Then you are ready to build your Qt!
Upvotes: 0