Skip to content

Installation under Windows

Thomas Euler edited this page May 16, 2025 · 39 revisions

These are the latest instructions for the QDSpy installation under Windows 11.
For more details, see manual.
For installation instructions under Linux, see here.

Installation under Windows 11

Note: I recommend using the procedure with standard Python (w/o Anaconda).

Note: With v0.91 and higher, the latest release of pyglet version 1 (currently v.1.5.29) can be used. Previous releases of QDSpy require pyglet v1.4.10. If you use an older QDSpy release, change line for pyglet installation below accordingly.

Using standard Python (recommended)

  1. Install Python from python.org

  2. Make sure that pip and virtualenv are up to date

    python.exe -m pip install --upgrade pip
    pip install virtualenv
    
  3. Clone the branch of choice to a new location on your drive:

    git clone https://github.com/eulerlab/QDSpy.git
    

    or

    git clone -b experimental https://github.com/eulerlab/QDSpy.git
    
  4. Change into that folder, create a new virtual environment, and activate it. The powershell command is only needed, if activating the environment fails due to safety restrictions.

    cd QDSpy
    python -m venv qdspy
    powershell -ExecutionPolicy Bypass
    .\qdspy\Scripts\activate
    
  5. Install packages.

    pip install -r requirements.txt
    
  6. Make sure that Windows knows the variable PYTHONPATH set to your QDSpy folder.
    To check, use:

    $env:PYTHONPATH
    

    To set the folder (e.g., for c:\qdspy), use:

    [System.Environment]::SetEnvironmentVariable("PYTHONPATH", $env:PYTHONPATH + ";c:\qdspy", [System.EnvironmentVariableTarget]::User)
    
  7. Create a tailored shortcut to QDSpy. This automatically starts a powershell, changes to the QDSpy folder, and activates the Python virtual environment:

    • Create a shortcut on the Windows desktop, open "properties" via right-clicking on the icon
    • Under "target" enter the following line, starting with the path to powershell.exe on your system:
      C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit -ExecutionPolicy Bypass -Command "& { .\qdspy\Scripts\activate }"
      
    • Under "Execute in" enter the path to your QDSpy folder (e.g., C:\Users\karle\QDSpy)
    • Optionally, you can change the shortcut's icon to that of QDSpy (in the QDSpy folder).
    • Save changes.

Using the Anaconda distribution (not recommended)

  1. Install Anaconda (currently with Python v3.11)

  2. Clone the branch of choice to a new location on your drive:

    git clone https://github.com/eulerlab/QDSpy.git
    

    or

    git clone -b experimental https://github.com/eulerlab/QDSpy.git
    
  3. Change into that folder, create a new conda environment, and activate it:

    cd qdspy
    conda config --add channels conda-forge
    conda create --name qdspy
    conda activate qdspy
    
  4. Install packages.

    conda install pip
    pip install pyglet==1.5.29
    pip install moviepy<2
    pip install PyQt6
    conda install numpy
    conda install pywin32
    conda install psutil 
    conda install pyserial 
    conda install hidapi
    conda instal pygame
    
  5. Make sure that Windows knows the variable PYTHONPATH set to your QDSpy folder.
    To check, use:

    $env:PYTHONPATH
    

    To set the folder (e.g., for c:\qdspy), use:

    [System.Environment]::SetEnvironmentVariable("PYTHONPATH", $env:PYTHONPATH + ";c:\qdspy", [System.EnvironmentVariableTarget]::User)
    

Troubleshooting

  • In case installing a package with conda does not work, try pip instead (see note above).

Clone this wiki locally