[issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation
Derek Keeler
report at bugs.python.org
Mon Mar 23 13:02:45 EDT 2020
Derek Keeler <derek.keeler+bugspython at gmail.com> added the comment:
Where would we like to put this information?
My proposal would be to add this in a combination of places:
1. Add a further note near the symlinks on Windows comment in this document: `Doc\using\venv-create.inc`
2. Add a blurb in the Activate.ps1 script itself, so that any user can see it very near where the problem might occur. `Lib\venv\scripts\common\Activate.ps1`
I'd probably put something like the following in there:
---
.. note::
On Microsoft Windows, it may be required to enable the ``Activate.ps1``
script by setting the execution policy for the user. You can do this by
issuing the following Powershell command from a Powershell command window:
PS C:\Users\user> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
See `About Execution Policies
<https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7>`_
for more information.
---
(This would exist as a ".Notes" section in the Activate.ps1 script)
What do folks think?
----------
nosy: +d3r3kk
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38972>
_______________________________________
More information about the Python-bugs-list
mailing list