2

I am currently using Python version 3.6. Previously used QGIS 2.99 as it was throwing errors, shifted to QGIS version 3.4. With the help of this "How can I discover the Python version in QGIS?" , I found that QGIS 3.4 has Python version 3.7.0. By this I understood QGIS 3 will use Python 3.

Can Python 3.6 be used in QGIS version 3.4, will it support a standalone script?

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Nov 2, 2018 at 13:16
3
  • I'm not sure I understand your question - particularly the bit about "will it support a standalone script". What do you mean by that? Commented Nov 2, 2018 at 14:03
  • QGIS version 3.4 support python 3.7. If I run python 3.6 codes will it make any difference? Can I call the QGIS function outside QGIS 3.4 in a standalone python script using Python version 3.6? Commented Nov 3, 2018 at 11:01
  • See gis.stackexchange.com/questions/276902/… Commented Nov 3, 2018 at 13:04

1 Answer 1

2

I think a bit of context about the ultimate goal here would help - what you are asking sounds bizzare as the Python code for QGIS is far more dependent on the QGIS version than the Python version (apart from Pyhon 2 vs 3, which in any case was a major change in QGIS.

To answer the question "will it make any difference if I run code written in Python 3.6 in QGIS 3.4 (Python 3.7)" it depends on the script, but Python tends not to make radical changes on point releases so you may be OK.

The other question is a no - QGIS installs its own version of python with all the QGIS binding libraries, and each Python version is self-contained. So no, you could not call qgis functions from your 3.6 installation unless you compile qgis yourself to use Python 3.6, as far as I know.

answered Nov 4, 2018 at 21:11
2
  • 1
    it is a good answer but does omit aspects of the underlying os. For Windows I agree with that answer, but what about linux? I'm not sure, but i think qgis uses the system-wide python install. Commented Dec 19, 2018 at 11:27
  • True - you are probably right for Linux installs - admit to being Windows-centric in this case, despite also running on Linux! Commented Dec 19, 2018 at 15:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.