Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codewithcharan/virtual-env-setup
https://github.com/codewithcharan/virtual-env-setup
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/codewithcharan/virtual-env-setup
- Owner: CodeWithCharan
- Created: 2024-01-24T11:17:50.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-09T17:01:37.000Z (7 months ago)
- Last Synced: 2024-07-09T21:35:07.038Z (7 months ago)
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Virtual Environment Set Up
### 1. Create a virtual environment for the default version:
```
python -m venv yourenv
```(Or)
### Create a virtual environment for the specific Python version:
```
virtualenv -p yourenv
```### 2. Activate the virtual environment:
- In Command Prompt (CMD):
```
yourenv\Scripts\activate.bat
```- In PowerShell:
```
yourenv\Scripts\Activate.ps1
```- In Linux:
```
$ source mlopsenv/Scripts/activate
```## 3. Install ipykernel
```
pip install ipykernel
```### 4. Set jupyter kernel for the virtual environment
```
ipython kernel install --user --name=yourenv
```### 5. Select the installed kernel when you want to use jupyter notebook in this virtual environment
![image](https://github.com/CodeWithCharan/virtual-env-setup/assets/106027109/aca431ae-b861-447a-97c6-08a181681fb9)
### 6. If you want to freeze your requirements (optional):
```
pip3 freeze > requirements.txt # Python3
pip freeze > requirements.txt # Python2
```### 7. If you no longer need the kernel you can uninstall it (optional):
```
jupyter-kernelspec uninstall yourenv
```