When I press tab
on the command python3.7
I get the following
python3.7 python3.7-config python3.7m python3.7m-config
I looked up what's python3.7m
and found the answer - https://mcmap.net/q/158364/-difference-between-python3-and-python3m-executables.
Next I go to the python terminal of each implementation and type the following code
>>> import sysconfig
>>> sysconfig.get_config_var('EXT_SUFFIX')
I get the same output in both python implementations i.e .cpython-37m-darwin.so
I also tried the command diff <(python3.7 -m sysconfig) <(python3.7m -m sysconfig)
to see if there's any difference in configuration info of the 2 executables but the output is empty means they are the same.
If all the executables and configuration variables are same, then why create two different implementations of python?
Note:
I'm not talking about python3.7/3.7m-config
here.
python3.7-config
is not the same executable. According to the man page "python-config helps compiling and linking programs, which embed the Python interpreter, or extension modules that can be loaded dynamically (at run time) into the interpreter". As forpython3.7
andpython3.7m
, I wasn't aware of the "-m" version, but in Linux it's pretty common to have symlinks for one application to another. For example, changes are that there also is apython3
command at your system that points to thepython3.7
executable. – Barcarolepython3.7-config
. – Lewisconfigure
enables--with-pymalloc
so shared library file names would appear asfoo.cpython-32m.so
". So maybepython3m
is kept around for compatibility? – Jehoash