Reputation: 1883
I have an open source project called Djengu. To install it, the user must clone the repo and run make
to initiate the setup script. The setup script creates a Python virtual environment using virtualenv
. The command goes like
virtualenv -p python3.8 .python3.8_env
I'd like to pin the Python version to avoid anything breaking. I also cannot assume that any given user will have a python3.8
binary installed on their machine. And I cannot assume that they have pyenv
installed either.
I imagine I will have to make a trade off somewhere. How can I pin Python without making assumptions on what the user has installed? Is there a standard way to do something like this?
Upvotes: 0
Views: 236
Reputation: 6985
Since your Djengu project is a development environment, I think it's completely fine to require that your users first install pyenv
before calling make
. Just tell them to do so in the Readme. You can then use their pyenv
in your Makefile
to install the Python version you need.
Upvotes: 1