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

20.0.19 Fails on CentOS 7/older Python 2 - AttributeError: 'module' object has no attribute 'get_makefile_name' #1810

Closed
ianw opened this issue May 4, 2020 · 1 comment · Fixed by #1811
Labels

Comments

@ianw
Copy link
Contributor

ianw commented May 4, 2020

Issue

20.0.19 fails on centos 7 with Python 2.7.5

-bash-4.2# virtualenv --version
Traceback (most recent call last):
  File "/usr/bin/virtualenv", line 5, in <module>
    from virtualenv.__main__ import run_with_catch
  File "/usr/lib/python2.7/site-packages/virtualenv/__init__.py", line 3, in <module>
    from .run import cli_run
  File "/usr/lib/python2.7/site-packages/virtualenv/run/__init__.py", line 12, in <module>
    from .plugin.creators import CreatorSelector
  File "/usr/lib/python2.7/site-packages/virtualenv/run/plugin/creators.py", line 6, in <module>
    from virtualenv.create.via_global_ref.builtin.builtin_way import VirtualenvBuiltin
  File "/usr/lib/python2.7/site-packages/virtualenv/create/via_global_ref/builtin/builtin_way.py", line 7, in <module>
    from virtualenv.create.creator import Creator
  File "/usr/lib/python2.7/site-packages/virtualenv/create/creator.py", line 14, in <module>
    from virtualenv.discovery.cached_py_info import LogCmd
  File "/usr/lib/python2.7/site-packages/virtualenv/discovery/cached_py_info.py", line 26, in <module>
    _CACHE[Path(sys.executable)] = PythonInfo()
  File "/usr/lib/python2.7/site-packages/virtualenv/discovery/py_info.py", line 82, in __init__
    ("makefile_filename", sysconfig.get_makefile_filename()),
AttributeError: 'module' object has no attribute 'get_makefile_filename'

Seems to be from dfafc11 which introduced the usage of this call. After reading https://bugs.python.org/issue22199, it appears this might be _ prefixed on some platforms with older Python, such as CentOS 7 (looks like it only got renamed for 2.7.9?)

@ianw ianw added the bug label May 4, 2020
@ianw ianw changed the title Fails on CentOS 7 - AttributeError: 'module' object has no attribute '_get_makefile_name' Fails on CentOS 7 - AttributeError: 'module' object has no attribute 'get_makefile_name' May 4, 2020
ianw added a commit to ianw/virtualenv that referenced this issue May 4, 2020
Per the issue mentioned inline, this function may have different
names.  Probe for the _ prefixed version as well.

Closes: pypa#1810
ianw added a commit to ianw/virtualenv that referenced this issue May 4, 2020
Per the issue mentioned inline, this function may have different
names.  Probe for the _ prefixed version as well.

Closes: pypa#1810
ianw added a commit to ianw/virtualenv that referenced this issue May 4, 2020
Per the issue mentioned inline, this function may have different
names.  Probe for the _ prefixed version as well.

Closes: pypa#1810
@ianw ianw changed the title Fails on CentOS 7 - AttributeError: 'module' object has no attribute 'get_makefile_name' 20.0.19 Fails on CentOS 7/older Python 2 - AttributeError: 'module' object has no attribute 'get_makefile_name' May 4, 2020
rdoproject pushed a commit to rdo-infra/rdo-jobs that referenced this issue May 4, 2020
20.0.19 has caused issue[1] when running in CentOS7,
until it's fixed in next release and is in nodepool
images, let's workaround by installing older version.

[1] pypa/virtualenv#1810
Change-Id: I065c96a3f871f477ce572a1e508d489437af7d9c
@gaborbernat
Copy link
Contributor

Hello, this now has been released via https://pypi.org/project/virtualenv/20.0.20/

heads up

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants