Skip to main content

Installation Guide - Windows

This guide will walk you through setting up MLVisual on Windows 10/11 step by step.

๐Ÿ“‹ Prerequisitesโ€‹

  • Windows 10/11 (64-bit)
  • 8GB RAM minimum (16GB recommended)
  • 10GB free disk space
  • Internet connection

๐Ÿš€ Step-by-Step Installationโ€‹

1. Install Unity 2022.3 LTSโ€‹

Download Unity Hubโ€‹

  1. Go to unity.com/download
  2. Download Unity Hub for Windows
  3. Run the installer as administrator
  4. Follow the installer instructions

Install Unity Editorโ€‹

  1. Open Unity Hub
  2. Go to the "Installs" tab
  3. Click "Install Editor"
  4. Select Unity 2022.3.XX LTS (the latest version)
  5. In "Add Modules", select:
    • โœ… Visual Studio (for Windows development)
    • โœ… WebGL Build Support (for web demos)
    • โœ… Android Build Support (optional)
  6. Click "Install" and wait for it to finish

2. Install Python 3.8+โ€‹

Download Pythonโ€‹

  1. Go to python.org/downloads
  2. Download Python 3.8 or higher (recommended 3.9 or 3.10)
  3. IMPORTANT: Check the "Add Python to PATH" box during installation
  4. Select "Install Now"

Verify Installationโ€‹

Open Command Prompt (cmd) and run:

python --version
pip --version

Both commands should return version numbers without errors.

3. Set Up Virtual Environmentโ€‹

Create Project Directoryโ€‹

# Create a directory for your projects
mkdir C:\mlvisual-projects
cd C:\mlvisual-projects

Create Virtual Environmentโ€‹

# Create virtual environment
python -m venv mlvisual-env

# Activate the environment
mlvisual-env\Scripts\activate

Verify it Worksโ€‹

# You should see (mlvisual-env) at the beginning of your prompt
where python
# Should point to your virtual environment

4. Install mlvlabโ€‹

# Make sure your virtual environment is active
# You should see (mlvisual-env) in your prompt

# Update pip
python -m pip install --upgrade pip

# Install mlvlab
pip install mlvlab

# Verify installation
python -c "import mlvlab; print('mlvlab installed correctly')"

5. Install Additional Dependenciesโ€‹

# Essential libraries for RL
pip install numpy pandas matplotlib seaborn
pip install gymnasium stable-baselines3
pip install jupyter notebook

# For visualization and debugging
pip install tensorboard wandb

# For development
pip install black flake8 pytest

6. Configure Unity for mlvlabโ€‹

Install the mlvlab Packageโ€‹

  1. Open Unity Hub
  2. Create a new 3D project
  3. Go to Window > Package Manager
  4. Click the "+" in the top left corner
  5. Select "Add package from git URL"
  6. Enter: https://github.com/mlvisual/mlvlab-unity.git
  7. Click "Add"

Verify Installationโ€‹

  1. In Unity, go to Assets > Create > mlvlab
  2. You should see options like "Test Environment"
  3. If there are no errors, everything is working!

โœ… Complete Verificationโ€‹

Python Testโ€‹

Create a file test_installation.py:

import mlvlab
import numpy as np
import matplotlib.pyplot as plt
import gymnasium as gym

print("โœ… mlvlab imported correctly")
print("โœ… numpy working")
print("โœ… matplotlib working")
print("โœ… gymnasium working")
print("โœ… Installation complete!")

Unity Testโ€‹

  1. Open Unity Hub
  2. Create a new 3D project
  3. Go to Assets > Create > mlvlab > Test Environment
  4. If there are no errors, everything is working!

๐Ÿ”ง Windows-Specific Troubleshootingโ€‹

Error: "python is not recognized"โ€‹

Cause: Python not in PATH Solution:

  1. Reinstall Python and check "Add Python to PATH"
  2. Or manually add Python to PATH:
    • Search "Environment Variables" in Start menu
    • Click "Edit the system environment variables"
    • Click "Environment Variables"
    • Under "System Variables", find "Path" and click "Edit"
    • Add: C:\Users\[YourUsername]\AppData\Local\Programs\Python\Python39\
    • Add: C:\Users\[YourUsername]\AppData\Local\Programs\Python\Python39\Scripts\

Error: "pip is not recognized"โ€‹

Solution:

# Use python -m pip instead
python -m pip install --upgrade pip

Error: "mlvlab not found"โ€‹

Cause: Virtual environment not activated Solution:

# Navigate to your project directory
cd C:\mlvisual-projects

# Activate the environment
mlvisual-env\Scripts\activate

# Verify it's active (you should see (mlvisual-env))
pip list

Unity can't find mlvlabโ€‹

Solution:

  1. Verify the package is installed in Package Manager
  2. Restart Unity
  3. Verify you're using Unity 2022.3 LTS

Permission errors on Windowsโ€‹

Solution:

  1. Run Command Prompt as Administrator
  2. Or disable Windows Defender real-time protection temporarily
  3. Or add your project folder to Windows Defender exclusions

matplotlib issues on Windowsโ€‹

Solution:

# Install Visual C++ Redistributable
# Download from: https://aka.ms/vs/17/release/vc_redist.x64.exe

# Reinstall matplotlib
pip uninstall matplotlib
pip install matplotlib

PowerShell execution policy errorโ€‹

Solution:

# Run PowerShell as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

๐ŸŽ‰ Ready to Get Started!โ€‹

Now you have everything set up on Windows. You can:

  1. Explore the Glossary to understand the terms
  2. Read the Theoretical Articles to dive deeper into theory
  3. Start with the Laboratories to practice

๐Ÿ“ž Need Help?โ€‹

If you encounter any Windows-specific issues:

  1. Check the Troubleshooting section above
  2. Search our Glossary to understand terms
  3. Consult the Articles for theoretical concepts
  4. Join our community for support

Congratulations! You've set up MLVisual on Windows correctly.