I have been struggling with this for a few days so hopefully someone can offer some advice.
I have recently migrated to an M1 mac after working with intel based macs for 7+ years.
I have set up two python installations, one from arm64e brew (/opt/homebrew/bin) and one from x86_64 brew (/usr/local/bin).
I natively use the arm64e version and can install x86_64 only packages when needed using /usr/local/bin/pip3 install , then using /usr/local/bin/python3 I can run that package successfully.
The question I have, is that when I develop I use a virtual environment wrapper (venvwrapper). Currently I am using the arm64e virtual environment wrapper. So my pyenv.cfg looks like the following.
home = /opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9
implementation = CPython
version_info = 3.9.7.final.0
virtualenv = 20.8.0
include-system-site-packages = false
base-prefix = /opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9
base-exec-prefix = /opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9
base-executable = /opt/homebrew/opt/python@3.9/bin/python3.9
When working in this virtual environment it obviously does not let install packages using the x86_64 /usr/local/bin/pip3. So when I need to use these packages how do I do this??
Can I specify the path to the package I want to use which I know was installed using x86_64? Would that even work using a python installation that is arm64e?
I regularly need to use x86_64 packages so what is my best option here?
Should I just install the virtual env from my x86_64 brew installation and run everything through the translator?
Ideally I would like to use a mixture of arm64e and x86_64 packages in a virtualenv so I still benefit from the M1 native speed but not sure if this is possible and how I should go about it.