Python/pyenv: Difference between revisions
< Python
Jump to navigation
Jump to search
No edit summary |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= Installation = | = Installation for Windows = | ||
== Enable script execution in PowerShell == | == Enable script execution in PowerShell == | ||
| Line 19: | Line 19: | ||
<source lang="powershell"> | <source lang="powershell"> | ||
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1" | Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1" | ||
</source> | |||
https://pyenv-win.github.io/pyenv-win/ | |||
== Install python == | |||
Go to [https://www.python.org/downloads/ official site] and check maintenance status. | |||
Then choose a security version. | |||
Open GitBash and run the following commands. | |||
<source lang="sh"> | |||
pyenv update | |||
pyenv install -l | grep '^3.11' | |||
pyenv install 3.11.9 | |||
pyenv global 3.11.9 | |||
pyenv version | |||
</source> | </source> | ||
Latest revision as of 03:23, 9 October 2024
Installation for Windows
Enable script execution in PowerShell
Open PowerShell in Administration mode.
Then run this command.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
https://stackoverflow.com/questions/64633727/how-to-fix-running-scripts-is-disabled-on-this-system
Install pyenv
Open another PowerShell in user mode.
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"
https://pyenv-win.github.io/pyenv-win/
Install python
Go to official site and check maintenance status.
Then choose a security version.
Open GitBash and run the following commands.
pyenv update
pyenv install -l | grep '^3.11'
pyenv install 3.11.9
pyenv global 3.11.9
pyenv version