Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
# 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 2Petr 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
(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 4Charalampos Stratakis
2017-02-06 17:38:24 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
# 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.