Closed ILope92 closed 6 years ago
Hello,
I actually had the same struggles you had just yesterday and after reading through the other issues and a lot of try and error, I've managed to run Godot with python. Here are the steps you need to do:
Hope this helps a bit.
and the only way to get these is to compile the newest source code.
How to get these dlls? They are not in the releases. It's just the first time I run into a compilation.
@ILope92 Those dlls are in the zip files that are provided under the release section. If you download and unzip one of windows-zips, you can see that they are lying in the extracted folder "pythonscript". So you actually need copy the extracted folder to the pong example, cause the "pythonscript.gdnlib" are referencing to this path. If Godot won't start with these, you need to compile the newest sources which, will also create a "pythonscript" folder that you can use instead(With all the newest dlls included). The reason that Godot might not working with the provided zips under the release section is, that they are a bit dated (9. Januar) and Godot probably changed there Gdnative-Api since then.
Did I do it right?
@ILope92 Your Pong example folder needs to look like this (Ignore Global.py, this was just a test of mine):
I mean, if you are editing the ".gdnlib" you can see, that they are linking to "res://pythonscript/pythonscript.dll" and this doesn't currently exist in your screenshot(res:// basicly means the root folder of the pong project). You can ofcourse edit the path, but for future builds it's probably easier to setup the "normal" folder hierachy. The pythonscript folder itself is provided under the release section or by compiling the master branch.
The SCons build of godot-python can't create the symlinks into examples/pythonscript
and tests/pythonscript
that it does on other platforms (or maybe they're supposed to be created by git, either way they don't work out of the box), because Windows requires admin privs to create symlinks. So you can copy pythonscript and pythonscript.gdnlib out of build/windows-64-cpython
instead, or create the symlinks in an Admin cmd.exe window (using mklink /D
or mklink /J
, either should work).
ModuleNotFoundError: No module named 'pythonscriptcffi'... And Error: Could not load the scene because of the lack of dependencies.
Here are the folders:
You can show how the development in Python looks in Godot???)
@ILope92 actually if everything works as epected, nothing much will change in Godot. The only thing that is different, is the script dialog because you can then add Python as the desired scripting-language for that specific node:
Since the Python plugin still not work on your machine I suppose? I suggest you to just wait until @touilleMan added the Python plugin to the AssetLib(link).
Godot Python has landed on Godot asset store (see https://godotengine.org/asset-library/asset/179). It should be a 1-click deal to install and play with it now ;-)
Make an instruction for Windows users! I did not understand what to do! How to make this add-on for Godot ???