virtualenv icon indicating copy to clipboard operation
virtualenv copied to clipboard

AttributeError in version 20.33.1: 'PythonInfo' object has no attribute 'tcl_lib'

Open douwevandermeij opened this issue 1 year ago • 3 comments

Issue

  AttributeError

  'PythonInfo' object has no attribute 'tcl_lib'

  at /opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/virtualenv/activation/via_template.py:50 in replacements
       46│             "__VIRTUAL_ENV__": str(creator.dest),
       47│             "__VIRTUAL_NAME__": creator.env_name,
       48│             "__BIN_NAME__": str(creator.bin_dir.relative_to(creator.dest)),
       49│             "__PATH_SEP__": os.pathsep,
    →  50│             "__TCL_LIBRARY__": creator.interpreter.tcl_lib or "",
       51│             "__TK_LIBRARY__": creator.interpreter.tk_lib or "",
       52│         }
       53│ 
       54│     def _generate(self, replacements, templates, to_folder, creator):

Environment

Provide at least:

  • OS: Ubuntu
  • Shell: GitHub Actions
  • Python version and path: 3.12.11

douwevandermeij avatar Aug 06 '25 19:08 douwevandermeij

If the Github Action is public, could you link to the run? This should be an easy fix. Please try the PR below.

esafak avatar Aug 06 '25 20:08 esafak

Here is an example project/run that fails: https://github.com/douwevandermeij/test-virtualenv/actions/runs/16797823289/job/47572059324

douwevandermeij avatar Aug 07 '25 07:08 douwevandermeij

I am encountering the same error. @esafak when do you plan to merge the fix?

behiyeavci avatar Aug 14 '25 09:08 behiyeavci