RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1411685 - Unable to create a Python3 virtualenv with python-virtualenv 1.10.1-3.el7
Summary: Unable to create a Python3 virtualenv with python-virtualenv 1.10.1-3.el7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-virtualenv
Version: 7.5-Alt
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Charalampos Stratakis
QA Contact: Branislav Náter
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-10 09:54 UTC by Felix Schwarz
Modified: 2017-08-01 18:15 UTC (History)
4 users (show)

Fixed In Version: python-virtualenv-1.10.1-4.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-08-01 18:15:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1928 0 normal SHIPPED_LIVE python-virtualenv bug fix update 2017-08-01 18:07:52 UTC

Description Felix Schwarz 2017-01-10 09:54:23 UTC
# virtualenv --python=/usr/bin/python3 venv34
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in venv34/bin/python3
Also creating executable in venv34/bin/python
Failed to import the site module
Traceback (most recent call last):
  File "…/venv34/lib64/python3.4/site.py", line 67, in <module>
    import os
  File "…/venv34/lib64/python3.4/os.py", line 618, in <module>
    from _collections_abc import MutableMapping
ImportError: No module named '_collections_abc'

# rpm -q python-virtualenv
python-virtualenv-1.10.1-3.el7.noarch

# rpm -q python34
python34-3.4.5-3.el7.x86_64

Technically with a "pure" CentOS 7 this is not a problem (as it does not ship Python 3), the python34 above is from EPEL.


The problem was fixed upstream with https://github.com/pypa/virtualenv/commit/8ce3fcf153dd71c0e7f317161eefe2f6e7215ff0
(first released version with the fix is virtualenv 1.11)

Please consider patching/upgrading virtualenv.

Comment 2 Petr Viktorin (pviktori) 2017-01-12 16:32:41 UTC
As a workaround, you should be able to use Python3's venv module instead:

/usr/bin/python3 -m venv venv34

Comment 3 Felix Schwarz 2017-01-12 16:45:27 UTC
(In reply to Petr Viktorin from comment #2)
> As a workaround, you should be able to use Python3's venv module instead:
> 
> /usr/bin/python3 -m venv venv34

Unfortunately that does not work:

# /usr/bin/python3 -m venv venv34
Error: Command '['/home/pydicaapo/venv34/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

which is not really surprising because "-m venv" is basically what /usr/bin/pyvenv does...

Comment 4 Charalampos Stratakis 2017-02-06 17:38:24 UTC
This commit should be added on top as well to fix this issue:

https://github.com/pypa/virtualenv/commit/232ab405ab72bbb6b4032eb555dc4aa0a00c94f3

Comment 7 Branislav Náter 2017-04-26 09:44:42 UTC
Reproduced on python-virtualenv-1.10.1-3.el7.
Verfied on python-virtualenv-1.10.1-4.el7.

:: [  BEGIN   ] :: Create virtual environment :: actually running 'virtualenv --python=/usr/bin/python3 venv34'
Using base prefix '/usr'
New python executable in venv34/bin/python3
Also creating executable in venv34/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
Running virtualenv with interpreter /usr/bin/python3
:: [   PASS   ] :: Create virtual environment (Expected 0, got 0)


TCMS Test Results: https://tcms.engineering.redhat.com/run/303930/#caserun_15633848

Comment 8 errata-xmlrpc 2017-08-01 18:15:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1928


Note You need to log in before you can comment on or make changes to this bug.