feeling-free / python-issue

Solving issues for python development
0 stars 0 forks source link

Install pyenv in windows #2

Open marlon-v-git opened 4 months ago

marlon-v-git commented 4 months ago

Hi @feeling-free I don't know how to install pyenv in windows and set environment variables. Please guide me.

feeling-free commented 4 months ago
  1. Install Prerequisites: Ensure you have Git installed. If not, download and install it from Git for Windows.
  2. Install pyenv-win: Open a Command Prompt or PowerShell with administrative privileges. Execute the following commands to clone the pyenv-win repository and set up the environment variables:

    git clone https://github.com/pyenv-win/pyenv-win.git $HOME.pyenv setx PYENV "$HOME.pyenv" setx PATH "%PYENV%\bin;%PYENV%\shims;%PATH%"

  3. Restart Command Prompt: Close and reopen your Command Prompt or PowerShell for the changes to take effect. Verify the installation by running:

    pyenv version If the installation was successful, it should output the version of pyenv-win.

  4. Verify Installation: You can now use pyenv to install different versions of Python. For example:

    pyenv install 3.10.5

  5. Install Python Versions: To install a Python version, use:

    pyenv install 3.10.5

  6. Set Global Python Version: To set a global Python version, use:

    pyenv global 3.10.5

  7. Verify Python Version: Verify the active Python version with:

    python --version

marlon-v-git commented 4 months ago

Thanks for your help.