Skip to main content

Windows Setup Guide for NetSuite Python Reports

Quick Overview

Your team needs:

  1. Python (includes pip automatically)
  2. VS Code + Jupyter Extension
  3. Required packages (pandas, xlsxwriter)

Step 1: Install Python on Windows

  1. Go to: https://www.python.org/downloads/
  2. Click "Download Python 3.x.x" (latest version)
  3. 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] │
└─────────────────────────────────────────────────────┘
  1. Click "Install Now"
  2. Wait for installation to complete
  3. Click "Disable path length limit" if prompted (recommended)

Option B: Install from Microsoft Store

  1. Open Microsoft Store
  2. Search "Python"
  3. Click "Python 3.x" (official from Python Software Foundation)
  4. 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:

  1. Search "Environment Variables" in Start menu
  2. Click "Edit the system environment variables"
  3. Click "Environment Variables" button
  4. Under "System variables", find "Path", click "Edit"
  5. 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
  6. Click OK on all windows
  7. Restart Command Prompt and try again

Step 3: Install VS Code

  1. Go to: https://code.visualstudio.com/
  2. Click "Download for Windows"
  3. Run installer, accept defaults
  4. Launch VS Code

Step 4: Install VS Code Extensions

In VS Code:

  1. Click Extensions icon (left sidebar) or press Ctrl+Shift+X
  2. Search and install these extensions:
ExtensionPublisherPurpose
PythonMicrosoftPython language support
JupyterMicrosoftRun 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

  1. In VS Code, press Ctrl+Shift+P
  2. Type "Create: New Jupyter Notebook"
  3. Press Enter
  4. A new notebook opens!

Method 2: Open Existing Notebook

  1. File → Open File
  2. Select .ipynb file
  3. It opens in Jupyter interface

Step 7: Select Python Interpreter

When you first open a notebook:

  1. Click "Select Kernel" (top right of notebook)
  2. Choose "Python Environments"
  3. Select your Python installation (e.g., Python 3.12.x)

Using Jupyter in VS Code

Running Cells

ActionShortcut
Run current cellShift+Enter
Run cell, stay in placeCtrl+Enter
Run all cellsClick "Run All" button
Add cell belowB (when cell selected)
Add cell aboveA (when cell selected)
Delete cellDD (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 --version works in cmd
  • Verify: pip --version works 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!