[New-bugs-announce] [issue42534] venv does not work correctly when imported from .zip

Jussi Enkovaara report at bugs.python.org
Wed Dec 2 05:18:16 EST 2020


New submission from Jussi Enkovaara <jussi.enkovaara at csc.fi>:

In some cases it can be useful to provide standard library in a zip-file. 
However, when "venv" is imported from a zip-file, activate etc. scripts are not generated. The directory for script templates is determined in function setup_scripts in venv/__init__.py as

   path = os.path.abspath(os.path.dirname(__file__))
   path = os.path.join(path, 'scripts')

which becomes .../python38.zip/venv/scripts when is venv is imported from zip-file. No scripts are now generated, and no error / warning messages are invoked either.

----------
components: Library (Lib)
messages: 382301
nosy: jussienko
priority: normal
severity: normal
status: open
title: venv does not work correctly when imported from .zip
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42534>
_______________________________________


More information about the New-bugs-announce mailing list