Deserve a subscribe mate i was struggling in environment of qgis and vscode and i finally found your video. Great explained please make more video about qgis plugin development. Thank you my problem is solved!
I was struggling too, I looked for tutorials and couldn't find any, then I decided to make my own video :)... Unfortunately this is not my main job and I don't expect to make QGIS videos soon, but we never know
Thanks it helped me. For the tkinter part, in case somebody uses advanced QGIS installer it is possible to select this module and it will be automatically added (and upgraded in future) without manual copying of folders and DLLs
For me importing qgis.core did not work at first even though I followed the steps. somewhow renaming the file worked for me. Or it was closing the command promptand doing it again . idk
OSGEO_ROOT is the location where you installed QGIS, in my case it is "C:\Program Files\QGIS", it is set when you run the OSGeo4w.bat, the LOCALAPPDATA is from Windows, every user that logs in gets it, it should be something like "C:\Users\yourUser\AppData\Local". I set the PYTHONPATH to use the python installation that comes with QGIS and not the one I have on the system. Let me know if you have more questions
I have install pyenv in my desktop. and when I put "set py" I got: PYENV=C:\Users\Andres\.pyenv\pyenv-win\ PYENV_HOME=C:\Users\Andres\.pyenv\pyenv-win\ PYENV_ROOT=C:\Users\Andres\.pyenv\pyenv-win\ --- C:\Program Files\QGIS 3.18> "C:\Microsoft VS Code\Code.exe"
I did everything in the video. If I run (Shft+Enter) the QGIS python lines line by line, it prints the same lines in Terminal below. But if I run the python script in one run, it prints this: File "", line 1 & C:/PROGRA~1/QGIS32~1.3/bin/python.exe e:/ELTE_TTK_mesterkepzes/3_felev/Terinformatics_problem_solutions/Venyige/eszkoz/proba.py ^ SyntaxError: invalid syntax In neither case does it do what is in the program code.
You have a problem in proba.py, looks like you used different python version from when you ran Shift+Enter (are you using Jupyter Notebook?) and when you ran with QGIS. Try to use in the Notebook the same python version as QGIS. If they are the same, you need to check what line is giving you the Syntax Error.
Deserve a subscribe mate i was struggling in environment of qgis and vscode and i finally found your video. Great explained please make more video about qgis plugin development. Thank you my problem is solved!
I was struggling too, I looked for tutorials and couldn't find any, then I decided to make my own video :)... Unfortunately this is not my main job and I don't expect to make QGIS videos soon, but we never know
Thanks it helped me. For the tkinter part, in case somebody uses advanced QGIS installer it is possible to select this module and it will be automatically added (and upgraded in future) without manual copying of folders and DLLs
Didn't know about that. Is it something new? Anyway, thank you for the tip
I LOVE YOU MR!!!
Thanks
For me importing qgis.core did not work at first even though I followed the steps. somewhow renaming the file worked for me. Or it was closing the command promptand doing it again . idk
Hi, I'm a bit lost. Where do the paths that you paste (8:30 min) come from ? Where did you copy it from ? THank you !
OSGEO_ROOT is the location where you installed QGIS, in my case it is "C:\Program Files\QGIS", it is set when you run the OSGeo4w.bat, the LOCALAPPDATA is from Windows, every user that logs in gets it, it should be something like "C:\Users\yourUser\AppData\Local". I set the PYTHONPATH to use the python installation that comes with QGIS and not the one I have on the system. Let me know if you have more questions
@@brunorcabral Thank you for your help :)
@@luciebernard5800 I've just realized that I answered with my other UA-cam profile, brunorcabral is me. Let me know if you have more questions
me de uma dica, fiz tudo, e a variável py segue como não definida no vscode
Vc abriu o console clicando no "OSGeo4W.bat"?
I will give this a Try.
i think you should find a more pythonic way to make it work
can you give one example?
echo "Open System properties";
start c:\windows\system32\systempropertiesadvanced.exe;
And put all de PYTHONHOME and PATH
I have install pyenv in my desktop. and when I put "set py" I got:
PYENV=C:\Users\Andres\.pyenv\pyenv-win\
PYENV_HOME=C:\Users\Andres\.pyenv\pyenv-win\
PYENV_ROOT=C:\Users\Andres\.pyenv\pyenv-win\
---
C:\Program Files\QGIS 3.18> "C:\Microsoft VS Code\Code.exe"
Is this a question?
@@bcodetube not, thanks
I did everything in the video.
If I run (Shft+Enter) the QGIS python lines line by line, it prints the same lines in Terminal below. But if I run the python script in one run, it prints this:
File "", line 1
& C:/PROGRA~1/QGIS32~1.3/bin/python.exe e:/ELTE_TTK_mesterkepzes/3_felev/Terinformatics_problem_solutions/Venyige/eszkoz/proba.py
^
SyntaxError: invalid syntax
In neither case does it do what is in the program code.
You have a problem in proba.py, looks like you used different python version from when you ran Shift+Enter (are you using Jupyter Notebook?) and when you ran with QGIS. Try to use in the Notebook the same python version as QGIS. If they are the same, you need to check what line is giving you the Syntax Error.