Multiple python versions in one environment
See original GitHub issueSome tools are designed to have access to multiple python interpreters, and then create their own virtualenvs. Tox is a common example (although there are other ways to use tox in Actions). Less common, but my use case, is maturin https://github.com/PyO3/maturin , which is used to build rust crates with python bindings. It’s a lot quicker to do them all at once rather than in different jobs, as most of the compiled code is shared.
It would be helpful if setup-python
allowed users to pass an array of python versions and installed all of them (which one takes python
is up for debate, but python3.7
, python3.8
etc should be fine).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:42
- Comments:5
Top Results From Across the Web
How to manage multiple Python versions and virtual ...
If you wish to use multiple versions of Python on a single machine, then pyenv is a commonly used tool to install and...
Read more >Multiple Python versions on the same machine?
Old Answer: Install Python from source · 1) Install Required Packages for source compilation · 2) Download and extract desired Python version ·...
Read more >Managing Multiple Python Versions With pyenv
pyenv is a wonderful tool for managing multiple Python versions. Even if you already have Python installed on your system, it is worth...
Read more >How to Install and Manage Multiple Python Versions on Linux
How to Install and Manage Multiple Python Versions on Linux · Check the Default Version: · Check the Executable File: · Open the...
Read more >How to Install and Manage Multiple Python Versions on ...
This article uses a simple technique to install and manage multiple python versions without PyEnv. It installs every major version of python, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to use the Miniconda action as shown below to accomplish the OP’s mention for tox with multiple Pythons in one invocation, where I am testing a Python library for 3.7, 3.8, and 3.9. Note the
bash -l {0}
is required for the Miniconda action to work properly across steps. Below, thetestenv
environment is automatically active at each step. Essentially, I just create the extra Python environments using conda and append the paths for the Python binaries in those environments to the PATH when running tox in thetesting
environment.I would go for installing x86 and x64 python’s at same time as well, expecially if it means generating python c extension modules depending on the platform.