Is that possible to build a self-contained Python virtual environment? By self-contained, I mean that all needed files to execute the program are there, including Python.
I'm using Poetry to manage venv
s. Looking at venv
s I created using poetry install
I see that the dependencies are actually copied, but Python is simblinked.
For example:
>> ls -lah my-venv/bin/
python -> /Users/my-user/.pyenv/versions/3.11.2/bin/python
Also, I tried the virtualenvs.options.always-copy
Poetry config, which translates to --always-copy
virtualvenv configuration, but it didn't copy Python.
Since an expected answer would be "use containers", I say in advance that it's not an option for the given use case.
This question aims to a solution that an "all-in" directory/file can be uploaded to a Linux server and just run without using depending on any system-installed software.