mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-04-20 17:06:41 +00:00
Added pyenv install script and readme
This commit is contained in:
74
pyenv/README.md
Normal file
74
pyenv/README.md
Normal file
@@ -0,0 +1,74 @@
|
||||
---
|
||||
title: pyenv
|
||||
homepage: https://github.com/pyenv/pyenv
|
||||
tagline: |
|
||||
pyenv: Simple Python Version Management
|
||||
---
|
||||
|
||||
### Updating `pyenv`
|
||||
|
||||
```bash
|
||||
pyenv update
|
||||
```
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||
### List available python versions:
|
||||
|
||||
```bash
|
||||
pyenv install -l
|
||||
```
|
||||
|
||||
### Install Python versions:
|
||||
|
||||
```bash
|
||||
pyenv install <version>
|
||||
pyenv rehash
|
||||
```
|
||||
|
||||
### pyenv versions
|
||||
|
||||
List installed versions:
|
||||
```bash
|
||||
pyenv versions
|
||||
```
|
||||
|
||||
### pyenv local
|
||||
|
||||
Sets a local application-specific Python version:
|
||||
```bash
|
||||
pyenv local 2.7.6
|
||||
```
|
||||
|
||||
Unset the local version:
|
||||
```bash
|
||||
pyenv local --unset
|
||||
```
|
||||
|
||||
### List existing virtualenvs
|
||||
```bash
|
||||
pyenv virtualenvs
|
||||
```
|
||||
|
||||
### Create virtualenv
|
||||
|
||||
From current version with name "venv35":
|
||||
```bash
|
||||
pyenv virtualenv venv35
|
||||
```
|
||||
From version 2.7.10 with name "venv27":
|
||||
```bash
|
||||
pyenv virtualenv 2.7.10
|
||||
venv27
|
||||
```
|
||||
### Activate/deactivate
|
||||
|
||||
```bash
|
||||
pyenv activate <name>
|
||||
pyenv deactivate
|
||||
```
|
||||
|
||||
### Delete existing virtualenv
|
||||
```bash
|
||||
pyenv uninstall venv27
|
||||
```
|
||||
14
pyenv/install.sh
Normal file
14
pyenv/install.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
{
|
||||
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
|
||||
if [ -n "`$SHELL -c 'echo $ZSH_VERSION'`" ]; then
|
||||
echo 'export PATH="$HOME/.pyenv/bin:$PATH"'>> ~/.zshrc
|
||||
echo 'eval "$(pyenv init -)"'>> ~/.zshrc
|
||||
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
|
||||
else
|
||||
echo 'export PATH="$HOME/.pyenv/bin:$PATH"'>> ~/.bashrc
|
||||
echo 'eval "$(pyenv init -)"'>> ~/.bashrc
|
||||
echo 'eval "$(pyenv virtualenv-init -)"'>> ~/.bashrc
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user