pyenv icon indicating copy to clipboard operation
pyenv copied to clipboard

Install python version under a different name

Open KenMacD opened this issue 11 years ago • 6 comments

What I would like is to install multiple copies of the same version of python, with different build options.

My current solution for this is to download the python-build script and build with PYTHON_CONFIGURE_OPTS="..." python-build -v 2.7.8 ~/.pyenv/versions/2.7.8-custom1 but what I would rather do is something like PYTHON_CONFIGURE_OPTS="..." pyenv install 2.7.8 2.7.8-custom1 I think this would most closely match the way virtualenvs are created.

KenMacD avatar Aug 13 '14 15:08 KenMacD

There is a plugin s1341/pyenv-alias (see also #167). With the plugin, you can give a custom name for building version. Please give it a try.

env VERSION_ALIAS="2.7.8-custom1" PYTHON_CONFIGURE_OPTS="..." pyenv install 2.7.8

yyuu avatar Aug 14 '14 02:08 yyuu

This can be solved with using pyenv-alias plugin.

yyuu avatar Oct 09 '14 12:10 yyuu

This can be solved with using pyenv-alias plugin.

Unfortunately not anymore: https://github.com/s1341/pyenv-alias/issues/3#issuecomment-1402311894

I install the same version on Python on my M1 macbook twice: once with arch -x86_64 and once without. This way I can use Python packages that don't provide aarch64 wheels, e.g.

VERSION_ALIAS="3.11.4_x86" arch -x86_64 pyenv install 3.11.4

Is there a new workaround 6 years later with the modern version of pyenv

nchepanov avatar Aug 15 '23 16:08 nchepanov

@nchepanov I have the same issue. Seems that this plugin does not work any more.

ZmicierGT avatar Mar 28 '24 15:03 ZmicierGT

How about reopen issue, please?

13n1n avatar Sep 10 '24 22:09 13n1n

https://github.com/pyenv/pyenv/pull/2966

native-api avatar Sep 11 '24 22:09 native-api