2. Setup: Python, Jupyter, and Packages
2.2 Project Folder and venv
Why. Course labs should not mix with other projects. A venv keeps pandas and friends inside one box.
What. A project folder holds notebooks and data. A venv is a private Python package set for that folder.
How.
Steps — venv
mkdir datascience-labsthencd datascience-labs.- Create venv:
python -m venv .venv(orpython3 -m venv .venv). - Activate:
- Windows CMD:
.venv\Scripts\activate.bat - Windows PowerShell:
.venv\Scripts\Activate.ps1 - Linux / macOS:
source .venv/bin/activate
- Windows CMD:
- Your prompt should show
(.venv).
Example — check you are inside the venv
which python
python -c "import sys; print(sys.prefix)"
What it means. The path should end under datascience-labs/.venv. If it points to a system Python, activate again.
Ravindra Bagale's Tip
Keep one folder for this course (for example datascience-labs). Always activate the venv before pip install or Jupyter. Deeper pip/venv theory is in py10 — modules, pip and venv.
या course साठी एकच folder ठेवा (उदा. datascience-labs). pip install किंवा Jupyter आधी नेहमी venv activate करा. pip/venv ची सविस्तर माहिती py10 मध्ये आहे.
इस कोर्स के लिए एक ही फोल्डर रखो (जैसे datascience-labs)। pip install या Jupyter से पहले हमेशा venv activate करो। pip/venv की पूरी बात py10 में है।
Next: install the course packages → 2.3 Install Packages (No sklearn).