Skip to content

Standord-AI/intellihack5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

intellihack5

Python Project Setup Guide

This guide will help you set up a virtual environment for your Python project using either Conda or venv, and install dependencies from a requirements.txt file.

Cloning the Repository

First, clone the repository:

git clone https://github.com/Standord-AI/intellihack5.git
cd intellihack5

Setting Up a Virtual Environment

Option 1: Using Conda

Create a Conda environment

You can create the environment in two ways:

Project-specific environment (recommended):

conda create --prefix ./conda_env python=3.10

Named environment (stored in Conda's central directory):

conda create --name project_name python=3.10

Activate the environment

For project-specific environment:

conda activate ./conda_env

For named environment:

conda activate project_name

Option 2: Using venv

Create a virtual environment

# On macOS/Linux
python3 -m venv .venv

# On Windows
python -m venv .venv

Activate the environment

# On macOS/Linux
source .venv/bin/activate

# On Windows
.\.venv\Scripts\activate

Installing Dependencies from requirements.txt

Creating a requirements.txt file

If you already have packages installed in your environment and want to create a requirements.txt file:

pip freeze > requirements.txt

Installing packages from requirements.txt

Using pip (works with both Conda and venv):

pip install -r requirements.txt

Using Conda (Conda environments only):

conda install --file requirements.txt

Project Structure

A basic project structure might look like this:

intellihack5/
├── .venv/ or conda_env/     # Virtual environment folder
├── ipynb/                   # Source files
├── README.md                # Project documentation
├── requirements.txt         # Dependencies
└── .gitignore               # Git ignore file

Deactivating the Environment

When you're done working on your project:

# For both Conda and venv
conda deactivate  # For Conda
deactivate        # For venv

Additional Tips

  • Add your virtual environment folder to .gitignore to avoid committing it to version control.
  • Consider using a setup.py or pyproject.toml file for more complex projects.
  • For collaborative projects, ensure everyone uses the same Python version.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published