0% found this document useful (0 votes)
186 views

Documentation For Using Otree

Installing and using apps in oTree involves downloading Python and oTree, creating a project folder, running the zipserver command, downloading an oTree zip project file and placing it in the project folder, and accessing the project through a local host link in a web browser. Key steps are to install Python, pip install oTree, run the zipserver command in the project folder, download and extract a zip project file into that folder, and open the local host link provided to access the built-in apps.

Uploaded by

Aashish Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
186 views

Documentation For Using Otree

Installing and using apps in oTree involves downloading Python and oTree, creating a project folder, running the zipserver command, downloading an oTree zip project file and placing it in the project folder, and accessing the project through a local host link in a web browser. Key steps are to install Python, pip install oTree, run the zipserver command in the project folder, download and extract a zip project file into that folder, and open the local host link provided to access the built-in apps.

Uploaded by

Aashish Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Installing and Using apps in oTree

Installation for Windows


● Download and install ​Python 3.7 or newer​. Check the box to add Python to PATH:

● To check the current version of python, open command prompt and enter command
“python - V” and press enter. The current version python will be displayed in command
prompt.

● Create a folder where you will store your oTree projects. Then open Command Prompt
and enter this command:

pip3 install -U otree

Note: ​If you get error like this:


error: Microsoft Visual C++​ ​is​ ​required (Unable to find vcvarsall.bat).

1
To fix this, install the​ ​Visual C++ Build Tools​.

2
Steps for running a project in oTree

Step 1:
Open command prompt and navigate to the folder, where you will be saving your oTree projects,
using the change directory command “cd”.

Here oTree_zips is the folder where my projects will be stored.

Step 2:
In the command prompt type command:
Otree zipserver

The above will be shown in the command prompt.

3
Step 3:
We will now have to download the oTre zip file and place it in our project folder.
Go to ​https://www.otreehub.com/studio​. Navigate to the Download tab.

Then click on the download button to download the zip file of the project created.

4
Step 4:
Copy the project zip file downloaded and paste it in your project folder (oTree_zips in my case).

Step 5:
The following will appear in your command prompt along with a link:

Running rwf-new_project.otreezip
System check identified no issues (0 silenced).
makemigrations & migrate ran in 5.4s
Open your browser to ​http://localhost:8000/
To quit the server, press Control+C.

5
Step 6:
Copy the link and paste it in your browser. You will be redirected to the page containing the apps
you made.

On the webpage you will find all the apps you create in your project. Click on the one you wish
to use and you will be redirected to a new page which will show your app.

You might also like