https://github.com/florianmgs/pyenv-local
Create a venv in current directory using pyenv. Usage: `py 3.11.3 venv`
https://github.com/florianmgs/pyenv-local
bash pyenv python
Last synced: 2 months ago
JSON representation
Create a venv in current directory using pyenv. Usage: `py 3.11.3 venv`
- Host: GitHub
- URL: https://github.com/florianmgs/pyenv-local
- Owner: FlorianMgs
- Created: 2023-05-22T23:45:55.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-23T02:13:25.000Z (almost 2 years ago)
- Last Synced: 2025-01-17T06:31:36.452Z (4 months ago)
- Topics: bash, pyenv, python
- Language: Shell
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PyEnv-Local Setup Guide
This script creates a Python virtual environment in current working directory using pyenv with a specified Python version.
## Prerequisites
- [Pyenv](https://github.com/pyenv/pyenv) should be installed.
## Installation Steps
1. Clone the repo or download `pyenv-local.sh`.
2. Move the script to a location in your PATH:```bash
mv pyenv-local.sh /usr/local/bin/pyenv-local
chmod +x /usr/local/bin/pyenv-local
```3. Create the `py` alias:
```bash
echo 'alias py="/usr/local/bin/pyenv-local"' >> ~/.bashrc
source ~/.bashrc
```## Usage
```bash
py
```For example: `py 3.11.3 venv`