How to solve Python error: "xxx/.venv/bin/python3.8', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1."

Shahriar Khondokar 1 Reputation point
2021-12-20T03:23:07.547+00:00

Hi,

I am following the Microsoft Tutorial here: https://learn.microsoft.com/en-us/windows/python/web-frameworks

I am at the step, "Create a virtual environment" and have completed all previous steps successfully.

However, now when I enter python3 -m venv .venv in the Linux (Ubuntu) command line, I get the following:
Error: Command '['/mnt/c/my/Python/Directory/HelloWorld/.venv/bin/python3.8', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

Can you please help solve this error?

Hence, when I enter, "source .venv/bin/activate", I get following message:
-bash: .venv/bin/activate: No such file or directory

Thanks in advance for your help!

Developer technologies Small BASIC
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. WhTurner 236 Reputation points
    2021-12-20T12:18:40.933+00:00

    I think you will get a better response with a Python related tag. Thie tag "small-basic" is about the Small Basic language!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.