django-simple-deploy / django-simple-deploy/dsd-flyio
Pipenv Required explicit --python 3.12 Flag to Deploy
- Dominant language
- Python
- Stars
- 5
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
During my first attempt to run an `--automate-all` deployment with fly.io, I ran into the below error when the fly command was trying to build a Dockerfile for deployment:
```
7.862 Successfully installed certifi-2026.2.25 distlib-0.4.0 filelock-3.25.2 packaging-26.0 pipenv-2026.1.0 platformdirs-4.9.4 python-discovery-1.1.3 setuptools-82.0.1 virtualenv-21.2.0
7.863 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
7.982 + pipenv install
8.952 Warning: Python 3.10 was not found on your system...
8.954 Neither 'pyenv' nor 'asdf' could be found to install Python.
8.954 You can specify specific versions of Python with:
8.955 $ pipenv --python path/to/python
------
Error: failed to fetch an image or build from source: error building: failed to solve: process "/bin/sh -c set -ex && pip install --upgrade pip && pip install pipenv && pipenv install && rm -rf /root/.cache/" did not complete successfully: exit code: 1
```
After some investigation, I realized that I could specify the `--python 3.12` as part of the run command in the Dockerfile on line 15, e.g.:
```
RUN set -ex && \
pip install --upgrade pip && \
pip install pipenv && \
pipenv --python 3.12 install && \
rm -rf /root/.cache/
```
I'm not sure if this is "dependency drift" in the `slim-bullseye` version of the Docker base image, or if it has something to do with Apple Silicon images, but after I added the Python 3.12 flag, the `fly deploy` command worked just fine for me.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.