Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-nox does not install ensurepip module? #1004

Open
paduszyk opened this issue Aug 26, 2024 · 0 comments
Open

docker-nox does not install ensurepip module? #1004

paduszyk opened this issue Aug 26, 2024 · 0 comments

Comments

@paduszyk
Copy link

paduszyk commented Aug 26, 2024

First of all, thanks for this Docker image. It is really helpful! 👍🏻

I have tried creating a virtual environment using venv (I'm on a dev container in VS Code).

This is what I get:

$ python3.12 -m venv myenv
Error: Command '['/workspaces/project/myenv/bin/python3.12', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

myenv is created but pip is not installed. It looks like because ensurepip module is not found:

$ myenv/bin/python -m ensurepip
/workspaces/project/myenv/bin/python3.12: No module named ensurepip

A workaround is:

#!/usr/bin/env bash

set -e

curl -fsSo /tmp/get_pip.py https://bootstrap.pypa.io/get-pip.py

python3.12 -m venv --without-pip .venv

.venv/bin/python /tmp/get_pip.py
.venv/bin/python -m pip install -e '.[dev]'

rm /tmp/get_pip.py

but I feel that having pip by default is quite unnatural. Is there any reason for that? Or maybe I am doing something wrong. Let me know, thanks!

@github-staff github-staff deleted a comment Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@paduszyk and others