Theia: Python 2.x? Why not 3.x?

Created on 21 Apr 2019  路  3Comments  路  Source: eclipse-theia/theia

I just came on this interesting project. Then I read the docs:
requires python --version point to a Python 2.x

So.. no support for Python 3.x?

python question

Most helpful comment

You can install Python3 and use it from the terminal. In that sense, Python3 is supported. Some of the backend code uses Python2 but it won't effect you using Python3.

This issue is being worked on by several people in the community at the moment. Feel free to join and make any contributions you like.

https://github.com/theia-ide/theia/issues/4956

All 3 comments

You can install Python3 and use it from the terminal. In that sense, Python3 is supported. Some of the backend code uses Python2 but it won't effect you using Python3.

This issue is being worked on by several people in the community at the moment. Feel free to join and make any contributions you like.

https://github.com/theia-ide/theia/issues/4956

I just came on this interesting project. Then I read the docs:
requires python --version point to a Python 2.x

So.. no support for Python 3.x?

It is a build requirement, as Theia depends on some Node native extensions, a minimal build toolchain is required, in order to be able to run node-gyp which handles building on install:
https://github.com/nodejs/node-gyp#on-unix

Then as @jgbradley1 said, the backend might depend on some way on python in your path pointing to Python 2.7 (pretty common on linux to have python refering to Python 2 and python3 refering to a Python 3.x interpreter, as some tools are bound to one version).

python refering to Python 2 and python3 refering to a Python 3.x interpreter

馃憤

I'm closing this because the original question was answered already and node-gyp was mentioned as the reason to refer to python2 in the docs.

Just one thing in addition to that: you can configure npm to pick a particular python (e.g. for node-gyp) in order to avoid pollution of you dev environment like this:

npm config set python /usr/bin/python --global
&& npm config set python /usr/bin/python
Was this page helpful?
0 / 5 - 0 ratings