Creating a bug report/issue
I have searched the existing open and closed issues
Required Information
- DietPi version:
G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=8 - Distro version
bookworm 0
Additional Information (if applicable)
python3
Steps to reproduce
Context: I want to automate my rpi5 installation using dietpi first boot text file and post installation script.
So I used the automatic dietpi installation and installed the software:
130 Python 3: Runtime system, pip package installer and development headers
And then I try to run the script:
#!/bin/bash
####################################
#
# Script to execute after dietpi
# initial installation.
#
####################################
dir_location=/opt/shared
mkdir $dir_location; cd $dir_location && python3 -m venv env && env/bin/python3 -m pip install requests
Expected behaviour
I expect the virtual environment env to be created and usable.
Actual behaviour
I have the error:
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt install python3.11-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Failing command: /opt/shared/env/bin/python3
Extra details
How I could avoid this issue / fully automate my venv creation?
Sincerely