Source: ZoosGlobal/python_pck Visibility: Public This page is automatically synchronized from the repository README. Do not edit this generated file directly.
🐍 Python Installation & Package Management (Windows)
Section titled “🐍 Python Installation & Package Management (Windows)”This guide explains how to install Python correctly for all users on Windows and how to install packages online and offline using the python_pck repository.
1️⃣ Install Python (For All Users)
Section titled “1️⃣ Install Python (For All Users)”Download Python
Section titled “Download Python”Download Python from the official website:
https://www.python.org/downloads/windows/Installation options (IMPORTANT)
Section titled “Installation options (IMPORTANT)”During installation:
- ✅ Install for all users
- ✅ Add Python to PATH
- ❌ Do NOT install via Microsoft Store
This installs Python under:
C:\Program Files\Python311\2️⃣ Verify Python Installation
Section titled “2️⃣ Verify Python Installation”Open Command Prompt and run:
where pythonExpected output
Section titled “Expected output”C:\Program Files\Python311\python.exeCheck version:
python --versionExample:
Python 3.11.03️⃣ Understand Where Python Installs Packages
Section titled “3️⃣ Understand Where Python Installs Packages”Python installs packages in different locations depending on how it is run.
System-wide installation path (CORRECT)
Section titled “System-wide installation path (CORRECT)”C:\Program Files\Python311\Lib\site-packagesUser installation path
Section titled “User installation path”C:\Users\<username>\AppData\Roaming\Python\Python311\site-packagesTo make packages available to all users, they must be installed in the system-wide path.
4️⃣ Install Packages ONLINE (Internet Access)
Section titled “4️⃣ Install Packages ONLINE (Internet Access)”Open Command Prompt as Administrator
Section titled “Open Command Prompt as Administrator”Always run package installs as Administrator.
Install a package
Section titled “Install a package”"C:\Program Files\Python311\python.exe" -m pip install requestsInstall multiple packages
Section titled “Install multiple packages”"C:\Program Files\Python311\python.exe" -m pip install requests pandas openpyxl numpy5️⃣ Verify Online Installation
Section titled “5️⃣ Verify Online Installation”"C:\Program Files\Python311\python.exe" -c "import requests, pandas, openpyxl, numpy; print('ALL OK')"Check install location:
"C:\Program Files\Python311\python.exe" -c "import pandas; print(pandas.__file__)"Expected:
C:\Program Files\Python311\Lib\site-packages\pandas\__init__.py6️⃣ Install Packages OFFLINE (Using python_pck Repo)
Section titled “6️⃣ Install Packages OFFLINE (Using python_pck Repo)”Clone or copy the repository
Section titled “Clone or copy the repository”git clone https://github.com/shivamzoos/python_pckOr copy the repository folder manually to the target machine.
Repository structure
Section titled “Repository structure”python_pck/│├── offline_packages/│ ├── install.bat│ ├── requirements.txt│ └── *.whl│└── README.md7️⃣ Clean Old Package Installations (Recommended)
Section titled “7️⃣ Clean Old Package Installations (Recommended)”Before offline installation, remove any existing packages:
"C:\Program Files\Python311\python.exe" -m pip uninstall -y ^requests pandas openpyxl numpy ^pytz python-dateutil et-xmlfile urllib3 ^charset-normalizer idna certifi six tzdataOptionally remove leftover user packages:
rmdir /s /q "C:\Users\<username>\AppData\Roaming\Python\Python311"8️⃣ Install Packages OFFLINE (System-Wide)
Section titled “8️⃣ Install Packages OFFLINE (System-Wide)”Navigate to the offline package directory:
cd python_pck\offline_packagesRun Command Prompt as Administrator and execute:
"C:\Program Files\Python311\python.exe" -m pip install ^ --no-index ^ --find-links=. ^ --ignore-installed ^ -r requirements.txtWhat these flags do
Section titled “What these flags do”| Flag | Description |
|---|---|
--no-index |
Prevents internet usage |
--find-links=. |
Uses local wheel files |
--ignore-installed |
Forces clean installation |
9️⃣ Verify Offline Installation
Section titled “9️⃣ Verify Offline Installation”"C:\Program Files\Python311\python.exe" -c "import requests, pandas, openpyxl, numpy; print('ALL OK')"Verify dependencies:
"C:\Program Files\Python311\python.exe" -c "import pytz, dateutil, et_xmlfile, urllib3; print('DEPS OK')"🔍 Check Installed Package Paths
Section titled “🔍 Check Installed Package Paths”"C:\Program Files\Python311\python.exe" -c "import site; print(site.getsitepackages())"Expected output:
['C:\\Program Files\\Python311', 'C:\\Program Files\\Python311\\Lib\\site-packages']🚫 Common Mistakes to Avoid
Section titled “🚫 Common Mistakes to Avoid”- ❌ Installing Python via Microsoft Store
- ❌ Running
pip installwithout Administrator privileges - ❌ Using
pip install --user - ❌ Mixing multiple Python installations
- ❌ Installing packages without verifying paths
🧠 Key Takeaway
Section titled “🧠 Key Takeaway”Install Python for all users and install packages as Administrator. This ensures packages are available system-wide and usable by everyone.
✅ Status
Section titled “✅ Status”Python installed correctlyPackages installed system-wideOnline and offline installs supported
