0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

oTreeの導入及びIATの設定

Last updated at Posted at 2021-06-14

oTreeの導入及びIATの設定

git clone https://github.com/WZBSocialScienceCenter/otree_iat.git

PythonのVersionを確認

python -V

残念ながら、うちのサーバーはPython 2.7.5なので、新Versionが必要。

yum install -y centos-release-scl
yum install -y rh-python38 which
scl enable rh-python38 bash

参考(https://qiita.com/witchcraze/items/592483c7625e881d771f)

cd otree_iat
pip install -r requirements.txt

インストルー成功しましたら、テストをします。

 otree test iat

今度SQLiteのVersionが怒られました。

 wget https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz
 tar xvfz sqlite-autoconf-3310100.tar.gz
 cd sqlite-autoconf-3350500/
 ./configure --prefix=/usr/local
 make
 sudo make install
 sudo find /usr/ -name sqlite3
 cd
 rm sqlite-autoconf-3350500.tar.gz
 rm sqlite-autoconf-3350500 -Rf
 /usr/local/bin/sqlite3 --version
 /usr/bin/sqlite3 --version
 sqlite3 --version
 sudo mv /usr/bin/sqlite3 /usr/bin/sqlite3_old
 sudo ln -s /usr/local/bin/sqlite3 /usr/bin/sqlite3
# 共有ライブラリへパスを通す
# vi ~/.bashrcで設定を追加(すぐに反映する場合 source ~/.bashrc)しないとターミナルを起動するたびに実行することになります
export LD_LIBRARY_PATH="/usr/local/lib"

# PythonのSQLite3バージョン確認

python

Python 3.8.6 (default, Oct 27 2020, 09:13:12)
[GCC 9.3.1 20200408 (Red Hat 9.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.sqlite_version
'3.35.5'
>>>quit()

参考(https://qiita.com/rururu_kenken/items/8202b30b50e3bfa75821)

再度テスト

cd otree_iat/
otree test iat
(結果一部省略)
INFO /p/ejhatoyx/iat/Outro/21/
INFO /p/wna2nie1/iat/Outro/21/
INFO /p/kuouuuvd/iat/Outro/21/
INFO /p/oqb0mz9u/iat/Outro/21/
INFO Bots completed session
INFO Tip: Run this command with the --export flag to save the data generated by bots.
Destroying test database for alias 'default'...

でOKみたいです。

export OTREE_AUTH_LEVEL=STUDY
export OTREE_ADMIN_PASSWORD=hogehoge
export OTREE_PRODUCTION=1
otree resetdb
otree prodserver 8000
0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?