asdf-community / asdf-python

Python plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
643 stars 55 forks source link

How to install same python version twice? (intel + arm) #152

Open bram2000 opened 1 year ago

bram2000 commented 1 year ago

Hello,

I love asdf-python and use it all the time. Thank you to all the contributors.

One thing that is becoming an increasing need in my world is managing both intel and arm versions of python binaries. Arm for local stuff (M1 mac user here), intel when I want to run things "as production" (or build venvs for production systems etc.).

I've not been able to work out how to install the same python version twice using asdf-python, that is e.g. 3.10 intel and 3.10 arm. Is this currently possible? I've tried using asdf-alias but still no joy.

keywords: intel, arm, arm64, apple silicon, M1, M2

jdx commented 1 year ago

I think this should work:

$ arch -x86_64 asdf install python 3.11.0
$ mv ~/.asdf/installs/python/3.11.0{,-intel}
$ asdf install python 3.11.0
$ asdf global python 3.11.0-intel
$ asdf global python 3.11.0