erg-lang / erg

A statically typed language compatible with Python
http://erg-lang.org
Apache License 2.0
2.68k stars 55 forks source link

Allow custom python interpreter to be specified by path #441

Open James4Ever0 opened 1 year ago

James4Ever0 commented 1 year ago

There are multiple python implementations such as pypy, jython, ironpython, rustpython etc. Also user may use different python interpreters under different conda or venv environments.

Adding this configuration using config file (default within current directory or home directory, but can be explicitly ordered to read config from given path) or command line options would be appreciated!

mtshiba commented 1 year ago

A command option already exists to specify the interpreter to be used.

https://github.com/erg-lang/erg/blob/main/doc/EN/command_options.md#--py-command---python-command

The configuration file is currently under specification design. Please wait for a while.

Also, currently, Erg's bytecode backend only supports CPython. If you want to use other interpreters, please use the Python script backend (using transpile subcommand), which is an experimental feature.