An easy and quick way to create a temporary Python virtual environment.
tempyenv sets up a python environment in a temporary path.
$ python -m pip install tempyenv$ tempyenv
(tempyenv) is setting up your virtual environment...hold tight
Virtual environment created at /var/folders/4b/dnp21z017cg_rbgfdtzclqlm0000gn/T/tmpacwjkg5z/venv
Virtual environment loading from /var/folders/4b/dnp21z017cg_rbgfdtzclqlm0000gn/T/tmpacwjkg5z/venv
(tempyenv)(venv) $ echo "now you can pip install in your virtual environment"For a shorter command option, use:
$ tenv
or
$ tempyenvHelp
$ tempyenv -h
usage: tempyenv [-h] [-p PYTHON_EXEC] [-v]
options:
-h, --help show this help message and exit
-p, --python PYTHON_EXEC
Specify the Python executable
-v, --version show program's version number and exitTo specify a specific version of python
$ tempyenv -p python3.10or
$ python3.10 -m tempyenvtempyenv is released under the MIT License.
David Whiteside (david@davidwhiteside.com)