Windows Setup Guide for NetSuite Python Reports
Quick Overview
Your team needs:
- Python (includes pip automatically)
- VS Code + Jupyter Extension
- Required packages (pandas, xlsxwriter)
Step 1: Install Python on Windows
Option A: Download from Python.org (Recommended)
- Go to: https://www.python.org/downloads/
- Click "Download Python 3.x.x" (latest version)
- Run the installer
Important: Check These Boxes During Installation!
┌─────────────────────────────────────────────────────┐
│ Python 3.x.x Setup │
│ │
│ ☑ Install launcher for all users │
│ ☑ Add Python to PATH ← VERY IMPORTANT! │
│ │
│ [Install Now] │
└─────────────────────────────────────────────────────┘
- Click "Install Now"
- Wait for installation to complete
- Click "Disable path length limit" if prompted (recommended)
Option B: Install from Microsoft Store
- Open Microsoft Store
- Search "Python"
- Click "Python 3.x" (official from Python Software Foundation)
- Click "Get" or "Install"
This method automatically adds Python to PATH
Step 2: Verify Python & Pip Installation
Open Command Prompt (search "cmd" in Start menu) and run:
python --version
Should show: Python 3.x.x
pip --version
Should show: pip 2x.x.x from ...
Troubleshooting: "python is not recognized"
If you get this error, Python wasn't added to PATH. Fix it:
- Search "Environment Variables" in Start menu
- Click "Edit the system environment variables"
- Click "Environment Variables" button
- Under "System variables", find "Path", click "Edit"
- Click "New" and add these paths (adjust version number):
C:\Users\YOUR_USERNAME\AppData\Local\Programs\Python\Python312
C:\Users\YOUR_USERNAME\AppData\Local\Programs\Python\Python312\Scripts - Click OK on all windows
- Restart Command Prompt and try again
Step 3: Install VS Code
- Go to: https://code.visualstudio.com/
- Click "Download for Windows"
- Run installer, accept defaults
- Launch VS Code
Step 4: Install VS Code Extensions
In VS Code:
- Click Extensions icon (left sidebar) or press
Ctrl+Shift+X - Search and install these extensions:
| Extension | Publisher | Purpose |
|---|---|---|
| Python | Microsoft | Python language support |
| Jupyter | Microsoft | Run Jupyter notebooks in VS Code |
Step 5: Install Required Python Packages
Open Command Prompt (or VS Code Terminal with `Ctrl+``) and run:
pip install pandas xlsxwriter numpy openpyxl jupyter
Wait for installation to complete. You should see "Successfully installed..."
If pip is slow or times out:
Use a mirror:
pip install pandas xlsxwriter numpy openpyxl jupyter -i https://pypi.org/simple/
Step 6: Create Your First Notebook in VS Code
Method 1: Create New Notebook
- In VS Code, press
Ctrl+Shift+P - Type "Create: New Jupyter Notebook"
- Press Enter
- A new notebook opens!
Method 2: Open Existing Notebook
- File → Open File
- Select
.ipynbfile - It opens in Jupyter interface
Step 7: Select Python Interpreter
When you first open a notebook:
- Click "Select Kernel" (top right of notebook)
- Choose "Python Environments"
- Select your Python installation (e.g.,
Python 3.12.x)
Using Jupyter in VS Code
Running Cells
| Action | Shortcut |
|---|---|
| Run current cell | Shift+Enter |
| Run cell, stay in place | Ctrl+Enter |
| Run all cells | Click "Run All" button |
| Add cell below | B (when cell selected) |
| Add cell above | A (when cell selected) |
| Delete cell | DD (press D twice) |
Cell Types
- Code cells: Run Python code
- Markdown cells: Write documentation
Quick Test: Verify Everything Works
Create a new notebook and run this code:
# Cell 1: Test imports
import pandas as pd
import xlsxwriter
import json
print("All packages imported successfully!")
print(f"Pandas version: {pd.__version__}")
# Cell 2: Test DataFrame
data = [
{"name": "Test A", "amount": 1000},
{"name": "Test B", "amount": 2000}
]
df = pd.DataFrame(data)
print("DataFrame created!")
df
# Cell 3: Test Excel creation
import io
bio = io.BytesIO()
with pd.ExcelWriter(bio, engine='xlsxwriter') as writer:
df.to_excel(writer, sheet_name='Test', index=False)
print("Excel file created in memory!")
print(f"File size: {len(bio.getvalue())} bytes")
If all cells run without errors, you're ready!
Project Folder Setup
Create this folder structure:
C:\Users\YourName\Documents\NetSuiteReports\
├── notebooks\
│ └── aging_report_dev.ipynb
├── test_data\
│ └── aging_data_sample.json
└── test_output\
└── (generated Excel files go here)
Create folders via Command Prompt:
cd %USERPROFILE%\Documents
mkdir NetSuiteReports
cd NetSuiteReports
mkdir notebooks test_data test_output
Loading Test Data in VS Code
import json
import pandas as pd
# Load your exported NetSuite data
with open('../test_data/aging_data_sample.json', 'r', encoding='utf-8') as f:
aging_data = json.load(f)
# Convert to DataFrame
df = pd.DataFrame(aging_data)
df.head()
Common Issues & Fixes
Issue: "No module named pandas"
pip install pandas
Issue: Kernel keeps dying
Usually memory issue. Restart VS Code or reduce data size.
Issue: Can't see output in cells
Click "Clear All Outputs" then re-run cells.
Issue: Japanese/Special characters not showing
Add encoding when reading files:
with open('file.json', 'r', encoding='utf-8') as f:
Summary Checklist for Team
- Install Python from python.org (check "Add to PATH"!)
- Verify:
python --versionworks in cmd - Verify:
pip --versionworks in cmd - Install VS Code
- Install Python extension in VS Code
- Install Jupyter extension in VS Code
- Run:
pip install pandas xlsxwriter numpy openpyxl - Create test notebook and run sample code
- Ready to develop!