Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
1,487 Views

python -m venv returns an error

Jump to solution

I recently installed the Intel distribution for python.

The following error occurs when attempting to create a virtual environment:

python -m venv ${HOME}/venv6
Error: Command '['/N/u/hbrokaw/Carbonate/venv6/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

Is there any information about what would cause this to occur and how I can fix it.

Thanks,

Cicada Dennis

hbrokaw@iu.edu

0 Kudos

Accepted Solutions
Highlighted
1,487 Views

Well I figured out a solution, and Intel should really fix this, it is so easy.
I downloaded the Python source code. I built it. Then I copied the directory:
install_dir/lib/python3.6/ensure_pip/ to the intel distribution's install_dir/lib/python3.6
All Intel needs to do is add that directory and its contents to their distribution.

View solution in original post

0 Kudos
3 Replies
Highlighted
1,487 Views

Thanks. I have already installed virtualenv as a work-around on this issue. That does not, however, explain the error in this distribution. I installed the distribution as specified on the Intel site, and "out-of-the-box", so to speak, this function of python has this error. Is this error a known problem with the current linux version of the Python distribution?

0 Kudos
Highlighted
1,487 Views

As additional info, the error returned is:

/N/u/hbrokaw/Carbonate/venv6/bin/python: No module named ensurepip

So the ensurepip is not present in the virtualenv when it tries to create pip. If one uses the --without-pip option, then the venv gets created.

This seems like a bug in the distribution.

0 Kudos
Highlighted
1,488 Views

Well I figured out a solution, and Intel should really fix this, it is so easy.
I downloaded the Python source code. I built it. Then I copied the directory:
install_dir/lib/python3.6/ensure_pip/ to the intel distribution's install_dir/lib/python3.6
All Intel needs to do is add that directory and its contents to their distribution.

View solution in original post

0 Kudos