thp / pyotherside

Python Bindings for Qt 5 and Qt 6. Allows you to access a CPython 3 interpreter directly from your Qt QML user interface code.
https://thp.io/2011/pyotherside/
Other
364 stars 49 forks source link

QML Plugin not loading on Windows #90

Closed JustinSteventon closed 6 years ago

JustinSteventon commented 6 years ago

I'm getting the following: QQmlApplicationEngine failed to load component qrc:/main.qml:4 plugin cannot be loaded for module "io.thp.pyotherside": Cannot load library C:\Qt\5.10.0\msvc2015\qml\io\thp\pyotherside\pyothersideplugin1.dll: The specified module could not be found.

The DLL exists in that location (alongside Python37.dll which it links to).

I followed the steps in the tutorial for building, including building Python and deploying the plugin. Everything was successful with a couple of exceptions:

  1. In qpython_priv.cpp I had to add a "constexpr" before "int argc = 1;": constexpr int argc = 1; wchar_t *argv[argc];
  2. In the Building For Windows section of the developers guide, step (6) should be "Hit Deploy to install PyOtherSide in your local Qt folder"

Looks like a very interesting tool. If it could be a little easier to install that would be great.

JustinSteventon commented 6 years ago

Turns out the problem was that I had to copy Python*.dll to my exe folder. Also my build using MSVC 2015 tools was somehow broken. Using the prebuilt libraries works though.

Elwycliffs commented 6 years ago

Been trying to build pyotherside on Windows with no success. Please advise. What Qt version should I use? What VS C++ (Express) Compiler version should I use? MSVC 2015?? 64bit or 32bit??

or better, is it possible to share your version of the build?

thp commented 6 years ago

Please always try with the latest MSVC version (2017 as of this writing), the Community Editions are free for open source projects.

BlueKenny commented 5 years ago

Is there an Windows build i can use ?

(We have 2 Windows PCs at work :/...)