Module qtquick is not installed windows

I'm trying to get a basic PyQt5 QML project going using either Windows or Linux. I first tried Linux and with no luck am trying Windows now. My issue is whenever I try and run it via python main.py...

I’m trying to get a basic PyQt5 QML project going using either Windows or Linux. I first tried Linux and with no luck am trying Windows now. My issue is whenever I try and run it via python main.py it will complain that «module «QtQuick» is not installed» and «module «QtQuick.Window» is not installed».

I feel like this is a simple pointing of some path to the QT install location but don’t know where to go from here. Using Qt Widgets works but not QML.

My main.py file is:

import sys

from PyQt5.QtQml import QQmlApplicationEngine
from PyQt5.QtGui import QGuiApplication

def _find_plugins():
    import PyQt5
    from os import path
    paths = [path.abspath(path.join(path.dirname(PyQt5.__file__), 'plugins'))]
    import PyQt5.QtCore
    PyQt5.QtCore.QCoreApplication.setLibraryPaths(paths)

if __name__ == '__main__':
    # _find_plugins()

    app = QGuiApplication(sys.argv)

    engine = QQmlApplicationEngine()

    engine.load('test.qml')

    sys.exit(app.exec_())

and my test.qml file is:

import QtQuick 2.2
import QtQuick.Window 2.1

ApplicationWindow {
    visible: true
    width: 640
    height: 480
    minimumWidth: 400
    minimumHeight: 300
}

asked Jun 15, 2016 at 18:33

egfconnor's user avatar

1

Turns out I needed to add the following Environment Variable:

QML2_IMPORT_PATH

with the value in my case being:

C:Python35Libsite-packagesPyQt5qml

answered Jun 15, 2016 at 20:25

egfconnor's user avatar

egfconnoregfconnor

2,6171 gold badge24 silver badges44 bronze badges

2

I faced this problem in Linux, and after playing around, I found out that by removing qt and pyqt5 with:

conda remove -c conda-forge pyside2 pyqt 

And installing those package with pip, my problem got solved!
by using pip install pyqt5>=5.11

p.s: I am using: ubuntu 20.04, miniconda, python 3.7, pyqt5>=5.11

answered Jun 17, 2021 at 12:53

Morteza's user avatar

Hi,

I’m facing with a problem that I can’t resolve. When i run my desktop application in the output this is what I see:

qrc:/qml/qml/MapTrack.qml:5:1: module "QtPositioning" is not installed
qrc:/qml/qml/MapTrack.qml:1:1: module "QtQuick" is not installed
qrc:/qml/qml/MapTrack.qml:3:1: module "QtQuick.Window" is not installed
qrc:/qml/qml/MapTrack.qml:4:1: module "QtLocation" is not installed
qrc:/qml/qml/MapTrack.qml:2:1: module "QtQuick.Controls" is not installed
qrc:/qml/qml/MapTrack.qml:5:1: module "QtPositioning" is not installed
qrc:/qml/qml/MapTrack.qml:1:1: module "QtQuick" is not installed
qrc:/qml/qml/MapTrack.qml:3:1: module "QtQuick.Window" is not installed
qrc:/qml/qml/MapTrack.qml:4:1: module "QtLocation" is not installed
qrc:/qml/qml/MapTrack.qml:2:1: module "QtQuick.Controls" is not installed
qrc:/qml/qml/MapTrack.qml:5:1: module "QtPositioning" is not installed
qrc:/qml/qml/MapTrack.qml:1:1: module "QtQuick" is not installed
qrc:/qml/qml/MapTrack.qml:3:1: module "QtQuick.Window" is not installed
qrc:/qml/qml/MapTrack.qml:4:1: module "QtLocation" is not installed
qrc:/qml/qml/MapTrack.qml:2:1: module "QtQuick.Controls" is not installed
qrc:/qml/qml/MapTrack.qml:5:1: module "QtPositioning" is not installed
qrc:/qml/qml/MapTrack.qml:1:1: module "QtQuick" is not installed
qrc:/qml/qml/MapTrack.qml:3:1: module "QtQuick.Window" is not installed
qrc:/qml/qml/MapTrack.qml:4:1: module "QtLocation" is not installed
qrc:/qml/qml/MapTrack.qml:2:1: module "QtQuick.Controls" is not installed
qrc:/qml/qml/MapTrack.qml:5:1: module "QtPositioning" is not installed
qrc:/qml/qml/MapTrack.qml:1:1: module "QtQuick" is not installed
qrc:/qml/qml/MapTrack.qml:3:1: module "QtQuick.Window" is not installed
qrc:/qml/qml/MapTrack.qml:4:1: module "QtLocation" is not installed
qrc:/qml/qml/MapTrack.qml:2:1: module "QtQuick.Controls" is not installed

My application is a c++ based application with one qml plugin that has to display a map.
Of course after this error the map is not shown.
Basically everything worked for some time, I have done some updates and now it display me this.

The interesting things is that all the QML example with the map works well, without problems.
This is what I include in my .Pro file:

QT       += core gui quick sql serialport charts qml

I found on the net that I should simply do a clean and a rebuild, but after that it still shows me this error.
I’m using QT 5.9.1 on windows, maybe do I have to update to QT 5.10?

Thanks in advance.

Hi,

A user reported and I confirm:

$ webcamoid
QQmlApplicationEngine failed to load component
qrc:/Webcamoid/share/qml/main.qml:25 module «QtQuick.Layouts» is not installed
qrc:/Webcamoid/share/qml/main.qml:24 module «QtQuick.Controls» is not installed
qrc:/Webcamoid/share/qml/main.qml:21 module «QtQuick» is not installed
qrc:/Webcamoid/share/qml/main.qml:23 module «QtQuick.Window» is not installed
qrc:/Webcamoid/share/qml/main.qml:25 module «QtQuick.Layouts» is not installed
qrc:/Webcamoid/share/qml/main.qml:24 module «QtQuick.Controls» is not installed
qrc:/Webcamoid/share/qml/main.qml:21 module «QtQuick» is not installed
qrc:/Webcamoid/share/qml/main.qml:23 module «QtQuick.Window» is not installed
qrc:/Webcamoid/share/qml/main.qml:25 module «QtQuick.Layouts» is not installed
qrc:/Webcamoid/share/qml/main.qml:24 module «QtQuick.Controls» is not installed
qrc:/Webcamoid/share/qml/main.qml:21 module «QtQuick» is not installed
qrc:/Webcamoid/share/qml/main.qml:23 module «QtQuick.Window» is not installed
qrc:/Webcamoid/share/qml/main.qml:25 module «QtQuick.Layouts» is not installed
qrc:/Webcamoid/share/qml/main.qml:24 module «QtQuick.Controls» is not installed
qrc:/Webcamoid/share/qml/main.qml:21 module «QtQuick» is not installed
qrc:/Webcamoid/share/qml/main.qml:23 module «QtQuick.Window» is not installed

The user said that he fixed the problem with qml-module-qtquick-dialogs package.
I installed the package but the errors still happen.

Webcamoid was builded with qtdeclarative5-dev. (log — i386)
https://buildd.debian.org/status/fetch.php?pkg=webcamoid&arch=i386&ver=7.0.0-2&stamp=1458754915

Do you have something in mind ?

regards,

4 / 4 / 0

Регистрация: 27.05.2012

Сообщений: 120

1

16.09.2015, 07:45. Показов 8431. Ответов 6


Вылавливаю такое сообщение и многие другие при попытке подключения qml файла в класс, наследуемый от QQuickWidget.
В чём может быть проблема?

authenticationwindow.cpp

C++ (Qt)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include "authenticationwindow.h"
#include "ui_authenticationwindow.h"
 
AuthenticationWindow::AuthenticationWindow(QWidget *parent) :
    QQuickWidget(parent)
{
    connect(this, SIGNAL(statusChanged(QQuickWidget::Status)),
            SLOT(slotCatchQmlErrors(QQuickWidget::Status)));
 
    QUrl source("../data/qml/UserLogin.qml");
    resize(400, 250);
 
    model = nullptr;
    root = nullptr;
    context = nullptr;
 
    setResizeMode(QQuickWidget::SizeRootObjectToView);
    setAttribute(Qt::WA_AlwaysStackOnTop);
    setClearColor(Qt::transparent);
    setWindowFlags(Qt::FramelessWindowHint);
    setSource(source);
 
    root = rootObject();
 
    context = rootContext();
    connect(root, SIGNAL(signalClose()), this, SIGNAL(signalCloseEvent()));
    connect(root, SIGNAL(signalOk(QString, QString, bool)), this,
            SIGNAL(signalOk(QString, QString, bool)));  // 888
    connect(root, SIGNAL(signalPressed()), this, SLOT(slotPressed()));
    connect(root, SIGNAL(signalReleased()), this, SLOT(slotReleased()));
    connect(root, SIGNAL(signalPositionChanged()), this,
            SLOT(slotPositionChanged()));
 
    if (!root)
    {
        qDebug() << "not connected: AuthenticationWindow";
        return;
    }
}
 
void AuthenticationWindow::slotCatchQmlErrors(QQuickWidget::Status s)
{
    if (s == QQuickWidget::Error)
    {
        qDebug() << "QML ERROR!";
        foreach (QQmlError err, errors()) {
            qDebug() << err.toString();
            qDebug() << err.description();
        }
    }
}
...

authenticationwindow.h

C++ (Qt)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
 
#include <QQuickWidget>
#include <QQuickItem>
#include <QQmlContext>
#include <QQmlEngine>
 
#include "model/usermodel.h"
 
class AuthenticationWindow : public QQuickWidget
{
    Q_OBJECT
public:
    explicit AuthenticationWindow(QWidget *parent = 0);
    ~AuthenticationWindow();
    QPushButton *butRegistration;
    UserModel *model;
    void setModel(UserModel *m);
public slots:
    void slotReturnPassword();
private slots:
    void slotOk();
    void slot();
    void slotPressed();
    void slotReleased();
    void slotPositionChanged();
    void slotCatchQmlErrors(QQuickWidget::Status s);
signals:
    void signalOk(QString us, QString psw, bool b);
    void signalCloseEvent();
private:
    QPoint difference;
    QString log;
    QString nolog;
    QLabel *lab;
    QLineEdit *lineUser;
    QLineEdit *linePassword;
    QPushButton *butOk;
    void closeEvent(QCloseEvent *event);
    QQuickItem *root;
    QQmlContext *context;
};

UserLogin.qml

JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import QtQuick 2.0
import QtQuick.Controls 1.3
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.3
 
Rectangle {
    id: root
    property int length: 24
    property int min: 10
    property string pathClose: "../icon/close.svg"
    property string pathCloseOff: "../icon/close1.svg"
    property string pathCloseOff2: "../icon/close2.svg"
    property string pathGlobexy: "../iconP/1.png"
    property string pathOk: "../icon/down14.svg"
    property string pathOkOff: "../icon/down15.svg"
    property string pathCancel: "../icon/close2.svg"
    property string pathReg: "../icon/reg2.svg"
    property string pathRegOff: "../icon/reg1.svg"
...
}

Ошибки

Кликните здесь для просмотра всего текста

QML ERROR!
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:1:1: module «QtQuick» is not installed»
«module «QtQuick» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:2:1: module «QtQuick.Controls» is not installed»
«module «QtQuick.Controls» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:3:1: module «QtQuick.Layouts» is not installed»
«module «QtQuick.Layouts» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:4:1: module «QtQuick.Controls.Styles» is not installed»
«module «QtQuick.Controls.Styles» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:1:1: module «QtQuick» is not installed»
«module «QtQuick» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:2:1: module «QtQuick.Controls» is not installed»
«module «QtQuick.Controls» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:3:1: module «QtQuick.Layouts» is not installed»
«module «QtQuick.Layouts» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:4:1: module «QtQuick.Controls.Styles» is not installed»
«module «QtQuick.Controls.Styles» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:1:1: module «QtQuick» is not installed»
«module «QtQuick» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:2:1: module «QtQuick.Controls» is not installed»
«module «QtQuick.Controls» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:3:1: module «QtQuick.Layouts» is not installed»
«module «QtQuick.Layouts» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:4:1: module «QtQuick.Controls.Styles» is not installed»
«module «QtQuick.Controls.Styles» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:1:1: module «QtQuick» is not installed»
«module «QtQuick» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:2:1: module «QtQuick.Controls» is not installed»
«module «QtQuick.Controls» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:3:1: module «QtQuick.Layouts» is not installed»
«module «QtQuick.Layouts» is not installed»
«file:///D:/GlobeXYMain/projects/BaseApplication/data/qml/UserLogin.qml:4:1: module «QtQuick.Controls.Styles» is not installed»
«module «QtQuick.Controls.Styles» is not installed»
not connected: AuthenticationWindow

Добавлено через 7 минут
P.S.: при подключении этого же класса в пустой проект, такие ощибки не вываливаются

Добавлено через 7 минут
P.P.S.: ошибки вываливаются только в дебаге, собственно в этом и проблема — из-за этого не могу нормально дебажиться

Добавлено через 1 час 18 минут
P.P.P.S.: ошибки возникают после вызова context = rootContext();

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



dsyleixa123

Posts: 1894
Joined: Mon Jun 11, 2018 11:22 am

qt5 creator: error: module QtQuick is not installed

by my project I get the build error: «module QtQuick version 2.12 is not installed»,
although I installed
sudo apt-get install qml-module-qtquick-controls

what is missing probably?

Last edited by dsyleixa123 on Thu May 13, 2021 9:26 am, edited 1 time in total.

hobby programming retiree, ♂, GER
«A programming language that uses left side whitespace or tabs for code block structuring and nesting is ridiculous.»



dsyleixa123

Posts: 1894
Joined: Mon Jun 11, 2018 11:22 am

Re: qt5 creator: error: module QtQuick is not installed

Thu May 13, 2021 7:16 am

I already did that once before:

qtdeclarative5-dev is already the newest version (5.7.1-2+rpi1).

the whole install hotchpotch (c+p’ed from different posts and sources) I already did so far is:

sudo apt install qtcreator
sudo apt install gnustep gnustep-devel clang-3.8-doc llvm-3.8-doc qtbase5-dev cmake kdelibs5-data subversion
sudo apt install qt5-default
sudo apt install qt5-qmltooling-plugins qt5-doc qt5-doc-html
sudo apt-get install qtdeclarative5-dev
sudo apt-get install qtdeclarative5-examples qtbase5-examples
sudo apt-get install qml-module-qtquick-controls
sudo apt-get install libqt5multimedia5-plugins

(why can’t they provide a GUI install program with options to complete install or check or uncheck options…? :evil: )

what is still missing?

hobby programming retiree, ♂, GER
«A programming language that uses left side whitespace or tabs for code block structuring and nesting is ridiculous.»


dsyleixa123

Posts: 1894
Joined: Mon Jun 11, 2018 11:22 am

Re: qt5 creator: error: module QtQuick is not installed

Thu May 13, 2021 9:28 am

edit, update,
the missing module is:

module QtQuick version 2.12 is not installed

but after repeatedly re-installing qml-module-qtquick-controls it says a different (?) module by a different version (?) is already installed:

sudo apt-get install qml-module-qtquick-controls

qml-module-qtquick-controls is already the newest version (5.7.1-20161021-2)

is there perhaps another qtquick to be installed? how? what is missing?

hobby programming retiree, ♂, GER
«A programming language that uses left side whitespace or tabs for code block structuring and nesting is ridiculous.»


dsyleixa123

Posts: 1894
Joined: Mon Jun 11, 2018 11:22 am

Re: qt5 creator: error: module QtQuick is not installed

Fri May 14, 2021 5:07 pm

even after having installed some more new modules, the compiler still is missing this eff*** QtQuick thing.
I think I better abandon it, I have already programmed my own project from the scratch without that messy GoL example.

hobby programming retiree, ♂, GER
«A programming language that uses left side whitespace or tabs for code block structuring and nesting is ridiculous.»


Return to “C/C++”

EDIT: Title should say 2.15*

Hello all,

I come to you with a problem that hopefully there is an easy solution for. I installed Qt for the first time today at home since I did so at work 6 months ago. When I did that initial work, I didn’t have any major installation problems so I figured this time would be similarly easy.

Unfortunately, no! It was not.

I thought I had everything installed; however, when I try to run a Qt Quick application, I get the error:

21:14:18: Starting /home/<myname>/.conda/envs/<environment>/bin/python -u '/home/<myname>/Documents/Qt Tests/Test_Project/main.py'...

QQmlApplicationEngine failed to load component

file:///home/<myname>/Documents/Qt Tests/Test_Project/main.qml:1 module "QtQuick" version 2.15 is not installed

Qt version is 5.15.0 running on Ubuntu 20.04 LTS. I apologize if this has an obvious solution, I am a casual Linux user and very much still a Qt noob. If there’s anything I can do to expedite a solution, please let me know and I will happily provide extra information. Thank you!


Wednesday, February 2, 2011


at


2:55 PM




By:

QML a day

Module «QtQuick» is not installed

Some of you might have encountered the message module «QtQuick» is not installed

import QtQuick 1.0

^

This message simply means that the Qt toolkit you are using is a version prior to version 4.7.1. Only from version 4.7.1 you will be able to use the QtQuick module.

First solution:

Change in your qml files the header import QtQuick 1.0 to import Qt 4.7

Second solution:

Download Qt 4.7.1 or higher :

Make sure that the Qt version used by QtCreator is the right one. You can add Qt version 4.7.1 from the preferences:

Just set Qt SDK 4.7.1 binary qmake and enter a proper name in the version name text field.

When you import or create a project select from the Project setup dialog window the Qt version 4.7.1 you just set up. You will be also able to to select the Qt version 4.7.1 for the simulator if you previously set it up in the preferences Qt versions:  

Like this post? Please share to your friends:
  • Modern setup host что это грузит диск windows 10
  • Modulenotfounderror no module named pil windows
  • Modern setup host при установке windows 10
  • Modulenotfounderror no module named matplotlib windows
  • Modern setup host ошибка обновления windows