The term 'otree' is not recognized as the name of a cmdlet, function,

1,314 views
Skip to first unread message

Abcde

unread,
May 22, 2021, 5:22:37 PM5/22/21
to oTree help & discussion
Dear community,

I just try to install otree on a new computer and tried with both "pip3 install -U otree" and "pip3 install -U "otree<5"". But whenever I try to run a command start with otree in windows Powershell, I get the following output.

otree : The term 'otree' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ otree startproject abc
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (otree:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


I tried to uninstall otree via "pip3 uninstall otree" before re-installing again, but I get same error.

Thank you for your help.

Chris @ oTree

unread,
May 22, 2021, 5:43:23 PM5/22/21
to oTree help & discussion
What happens if you just enter "python"?
Try reinstalling Python and make sure to check the box to add python to your PATH.

Abcde

unread,
May 23, 2021, 3:11:56 AM5/23/21
to oTree help & discussion
"python" works properly:

output:
Python 3.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Message has been deleted

BonnEconLab

unread,
Apr 28, 2022, 4:00:19 AM4/28/22
to oTree help & discussion
I encountered this issue when installing oTree on an experimenter’s Windows machine. The issue was caused by that fact that Python was already present on the machine and had been installed system-wide (i.e., “Install for all users” activated in the options of the Python installer, which requires admin rights), while we installed oTree without admin rights, i.e., only for the users. (That is, we executed pip install otree in a Windows PowerShell that we did not “run as administrator.”)

Installing both system-wide resolved the issue. (Installing both only in the user’s directory should also work.)

Andre Lot

unread,
May 14, 2022, 5:30:28 PM5/14/22
to oTree help & discussion
Hi,

I am facing the same problem. I do have oTree installed on both the admin user and the local user on my machine. Yet, I get the same error as our colleague when trying to access oTree from a local Powershell, which makes PyCharm Terminal unworkable (as it invokes the local Powershell).

Changing to the Command Prompt does not solve the issue.

Regards
Andre
Reply all
Reply to author
Forward
0 new messages