Skip to content

Instantly share code, notes, and snippets.

@fladd
Created October 3, 2017 08:34
Show Gist options
  • Save fladd/8dac1a1793241cb1f10c84b77716f76b to your computer and use it in GitHub Desktop.
Save fladd/8dac1a1793241cb1f10c84b77716f76b to your computer and use it in GitHub Desktop.

Install Expyriment into a virtual environment on Windows

Table of Contents

  1. Install Python
  2. Install virtualenv
  3. Create new environment for Expyriment
  4. Install Expyriment in newly created environment

1. Install Python

Download and run the latest Python 3.6 installer from https://www.python.org/downloads/release/python-362/. When you come across the following page in the installer, make sure the features ticked at the bottom will be installed:

python-installation

2. Install virtualenv

Open a command prompt (i.e. cmd.exe or power shell) and run the following command:

python -m pip install virtualenv

3. Create new environment for Expyriment

In the prompt run the following command:

virtualenv xpy

This will create a folder called xpy (at the current location) with python.exe, ready to go in its own environment. To activate the environment run the following command:

\Scripts\activate

The environment being activated is now indicated with the (xpy) on the left side of the prompt.

4. Install Expyriment in newly created environment

With the xpy environment active, anything you install now will be specific to this environment. In the prompt run the following command:

python -m pip install expyriment[all]

Once the installation is completed, import Expyriment once in Python, in order to download FFMPEG:

python -c 'import expyriment'

Eventually, deactivate the environment by running the following command:

\Scripts\deactivate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment