# How to install "Figures" appsembler

**URL:** https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142
**Category:** Site Operations Help
**Created:** [May 15, 2020, 1:37am UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142 "2020-05-15T01:37:07Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![taufanbudiman](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@taufanbudiman](https://discuss.openedx.org/u/taufanbudiman)
#### Post date: [May 15, 2020, 1:37am UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/1 "2020-05-15T01:37:07Z")

</div>

I followed this instruction to install figures on Edx Hawthorn

> <https://github.com/appsembler/figures/blob/master/docs/source/install.rst>

when i restart the LMS there is an error like this

 ![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/1X/29a60afba13c2dafe396f90ee458b323887adad1.png)

where should I set webpack\_loader? I did update\_assets but webpack-stats.json was not found

---

<div class="post-metadata">

### Author: ![anjali](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/anjali/32/405_2.png) [@anjali](https://discuss.openedx.org/u/anjali)
#### Post date: [May 15, 2020, 1:36pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/2 "2020-05-15T13:36:52Z")

</div>

Hi @taufanbudiman  
Have you got any solution for this?

I have the same issue, I am using the 0.3.9 build of figures.

---

<div class="post-metadata">

### Author: ![taufanbudiman](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@taufanbudiman](https://discuss.openedx.org/u/taufanbudiman)
#### Post date: [May 15, 2020, 2:26pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/3 "2020-05-15T14:26:58Z")

</div>

Not yet, I’m still confused about generating webpacks

---

<div class="post-metadata">

### Author: ![taufanbudiman](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@taufanbudiman](https://discuss.openedx.org/u/taufanbudiman)
#### Post date: [May 21, 2020, 9:22pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/4 "2020-05-21T21:22:32Z")

</div>

Hi @anjali  
I tried installing with branch build-0.3.9, it worked but the UI was not good. try to install, is it the same as my UI?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/1X/64cf40b9c33db10d783f62f2b091ba2979d08625.png)

---

<div class="post-metadata">

### Author: ![anjali](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/anjali/32/405_2.png) [@anjali](https://discuss.openedx.org/u/anjali)
#### Post date: [May 22, 2020, 7:32am UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/5 "2020-05-22T07:32:43Z")

</div>

@taufanbudiman I am getting the error in branch build-0.3.9

Still I will take a latest pull and try once.

---

<div class="post-metadata">

### Author: ![taufanbudiman](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@taufanbudiman](https://discuss.openedx.org/u/taufanbudiman)
#### Post date: [May 22, 2020, 12:14pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/6 "2020-05-22T12:14:08Z")

</div>

Hi @anjali,  
how do you install the application?  
I installed using pip install [https://github.com/appsembler/figures.git@build-0.39](https://github.com/appsembler/figures.git@build-0.39)

Check branch build-0.3.9. In the folder figures you find webpack-stats.js

---

<div class="post-metadata">

### Author: ![taufanbudiman](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@taufanbudiman](https://discuss.openedx.org/u/taufanbudiman)
#### Post date: [June 1, 2020, 2:56pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/7 "2020-06-01T14:56:57Z")

</div>

hi, @anjali, Have you successfully installed? I have succeeded.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/8/8da7925b89e4bc6f81160bbf56beb4e06ffb4ae5.png)

---

<div class="post-metadata">

### Author: ![Selli](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/selli/32/1062_2.png) [@Selli](https://discuss.openedx.org/u/Selli)
#### Post date: [June 1, 2020, 5:05pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/8 "2020-06-01T17:05:59Z")

</div>

@taufanbudiman

Could you give detailed steps followed to achieve this?

---

<div class="post-metadata">

### Author: ![anjali](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/anjali/32/405_2.png) [@anjali](https://discuss.openedx.org/u/anjali)
#### Post date: [June 2, 2020, 5:06am UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/9 "2020-06-02T05:06:50Z")

</div>

Hello @taufanbudiman, I have not tried after that, can you give me the steps for installation?

---

<div class="post-metadata">

### Author: ![taufanbudiman](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@taufanbudiman](https://discuss.openedx.org/u/taufanbudiman)
#### Post date: [June 2, 2020, 8:36am UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/10 "2020-06-02T08:36:46Z")

</div>

@Selli, @anjali

### Enable virtual environment

```auto
sudo -H -u edxapp bash
cd
source edxapp_env

```

### Install Figures build-0.3.9

clone figures on folder `~/venvs/edxapp/src/figures` , i use version build-0.3.9

```auto
git clone -b build-0.3.9 https://github.com/appsembler/figures.git

```

and then go to the frontend folder, build asset with yarn. First, run `yarn` to install dependecies and then `yarn build` to build asset of figures. Frontend assets will be available at `~/venvs/edxapp/src/figures/figures/static` . Copy generated frontend assets to staticfiles

```auto
cp -r ~/venvs/edxapp/src/figures/figures/static/figures /edx/var/edxapp/staticfiles/

```

install figures

```auto
cd ~/venvs/edxapp/src/figures/
pip install -e .

```

### Add Configuration Settings

```auto
cd ~/edx-platform/

```

Edit `lms/envs/production.py` and add configuration settings like below

```auto
if 'figures.apps.FiguresConfig' in INSTALLED_APPS:
    from figures.settings.lms_production import *
    ENV_TOKENS.setdefault('FIGURES', {})
    update_webpack_loader(WEBPACK_LOADER, ENV_TOKENS['FIGURES'])
    update_celerybeat_schedule(CELERYBEAT_SCHEDULE, ENV_TOKENS['FIGURES'])
    CELERY_IMPORTS += ( 'figures.tasks', )

```

Edit `lms/urls.py` and add configuration urls like below

```auto
if 'figures' in settings.INSTALLED_APPS:
        urlpatterns += [
                url(r'^figures/', include('figures.urls', namespace='figures')),
        ]

```

migrate database for figures

```auto
~/edx-platform/manage.py lms migrate figures --settings=production

```

### Restart LMS

exit user edxapp and then restart lms.

```auto
sudo /edx/bin/supervisorctl restart lms

```

access figures with `https://yourlms.com/figures/`

I hope this helps

---

<div class="post-metadata">

### Author: ![Xperez](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/xperez/32/1089_2.png) [@Xperez](https://discuss.openedx.org/u/Xperez)
#### Post date: [June 27, 2020, 4:43pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/11 "2020-06-27T16:43:14Z")

</div>

> [@taufanbudiman](#):
>
> and then go to the frontend folder, build asset with yarn. First, run `yarn` to install dependecies and then `yarn build` to build asset of figures. Frontend assets will be available at `~/venvs/edxapp/src/figures/figures/static` . Copy generated frontend assets to staticfiles

Hi @taufanbudiman im having problems with this step, when accessing the frontend folder if i type

> yarn

or

> yarn build

It shows me this error:

> ERROR: There are no scenarios; must have at least one.

Can you guide me with this step please?

---

<div class="post-metadata">

### Author: ![taufanbudiman](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@taufanbudiman](https://discuss.openedx.org/u/taufanbudiman)
#### Post date: [June 28, 2020, 2:35pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/12 "2020-06-28T14:35:01Z")

</div>

Have you activated Virtualenv and run it as edxapp??

---

<div class="post-metadata">

### Author: ![Xperez](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/xperez/32/1089_2.png) [@Xperez](https://discuss.openedx.org/u/Xperez)
#### Post date: [June 29, 2020, 4:21pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/13 "2020-06-29T16:21:19Z")

</div>

Hi @taufanbudiman, thanks for your answer 🙂

I think that i activate the virtual\_env correctly and work as edxapp:

To install figures the first thing i do in the command line is this:

> sudo su edxapp -s /bin/bash  
> cd /edx/app/edxapp  
> . edxapp\_env  
> . venvs/edxapp/bin/activate

Then git clone the repo:

> git clone -b build-0.3.9 [GitHub - appsembler/figures: Reporting and data retrieval app for Open edX](https://github.com/appsembler/figures.git)

And access the frontend folder:

> cd frontend

I then type **yarn** or **yarn build** and that when i get the errors.

---

<div class="post-metadata">

### Author: ![taufanbudiman](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@taufanbudiman](https://discuss.openedx.org/u/taufanbudiman)
#### Post date: [June 30, 2020, 12:26am UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/14 "2020-06-30T00:26:44Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/7/75b5f46ce5eb32934ae76db178af549b0dc25d75.png)  
this my version yarn or node.

maybe you can try uninstalling and reinstalling yarn

---

<div class="post-metadata">

### Author: ![Xperez](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/xperez/32/1089_2.png) [@Xperez](https://discuss.openedx.org/u/Xperez)
#### Post date: [June 30, 2020, 4:35pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/15 "2020-06-30T16:35:39Z")

</div>

Thanks a lot, that was exactly the problem, yarn version 🙂

Now i can see figures app almost completely, im having just a small problem with the “ **courses** ” tab inside figures, it shows nothing, did you have the same problem? I installed the master brach.

 ![Captura de Pantalla 2020-06-30 a la(s) 11.33.05](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/6/615da04011ca6d9afc3b2ee72b10c643331c1506.png)

This is my LMS LOG (I think the problem is related to the “ **TemplateDoesNotExist** : head-extra.html” error)

> Jun 30 16:38:10 X8 [service\_variant=lms][django.template][env:sandbox] WARNING [X8 17654] [loader\_tags.py:232] - Exception raised while rendering {% include %} for template ‘unknown’. Empty string rendered instead.  
> Traceback (most recent call last):  
> File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/loader\_tags.py”, line 204, in render  
> template = context.template.engine.get\_template(template\_name)  
> File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/engine.py”, line 162, in get\_template  
> template, origin = self.find\_template(template\_name)  
> File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/engine.py”, line 148, in find\_template  
> raise TemplateDoesNotExist(name, tried=tried)  
> TemplateDoesNotExist: head-extra.html  
> Jun 30 16:38:10 X8 [service\_variant=lms][py.warnings][env:sandbox] WARNING [X8 17647] [filters.py:74] - /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/rest\_framework/filters.py:74: DeprecationWarni$  
> DeprecationWarning

---

<div class="post-metadata">

### Author: ![Xperez](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/xperez/32/1089_2.png) [@Xperez](https://discuss.openedx.org/u/Xperez)
#### Post date: [June 30, 2020, 8:59pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/16 "2020-06-30T20:59:53Z")

</div>

My error was due to the version being used in my installation:

I tried following the steps above with a **master** branch, thats why i was getting the TemplateDoesNotExist error.

If you follow the instructions step by step you wont have problems.

- Check your yarn version and, if it does not match the screenshoot shared by @taufanbudiman do the following:

> sudo apt remove cmdtest (if you have any previous version)

> sudo apt remove yarn (just in case)

> curl -sS [https://dl.yarnpkg.com/debian/pubkey.gpg](https://dl.yarnpkg.com/debian/pubkey.gpg) | sudo apt-key add -

> echo “deb [https://dl.yarnpkg.com/debian/](https://dl.yarnpkg.com/debian/) stable main” | sudo tee /etc/apt/sources.list.d/yarn.list

> sudo apt-get update

> sudo apt-get install yarn

And please, thank the work of Mr @taufanbudiman 🙂

---

<div class="post-metadata">

### Author: ![kritika\_arora](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/kritika_arora/32/965_2.png) [@kritika\_arora](https://discuss.openedx.org/u/kritika_arora)
#### Post date: [July 23, 2020, 9:06pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/17 "2020-07-23T21:06:45Z")

</div>

Hi anjali ,  
I tried to install figures for the ironwood version and followed these steps:

1. Activated the edxapp\_env
2. pip install figures .
3. Added “ADDL\_INSTALLED\_APPS”: [“figures”] ![Screenshot from 2020-07-24 02-35-53](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/5/537e123189f45615e64da709a41d4cd4f46733ce.png) ![Screenshot from 2020-07-24 02-36-11](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/7/7a6026d5f7ae263ac0e8ee318eb10d22a7fb3673.png)  
in lms.env.json .  
But getting this error :

---

<div class="post-metadata">

### Author: ![Xperez](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/xperez/32/1089_2.png) [@Xperez](https://discuss.openedx.org/u/Xperez)
#### Post date: [July 24, 2020, 2:22pm UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/18 "2020-07-24T14:22:46Z")

</div>

Please follow exactly @taufanbudiman instructions, you wont have any problem.

If so, please paste your error here, but your error seems more like a mistake duplicating the label “Figures”.

---

<div class="post-metadata">

### Author: ![kritika\_arora](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/kritika_arora/32/965_2.png) [@kritika\_arora](https://discuss.openedx.org/u/kritika_arora)
#### Post date: [July 25, 2020, 4:17am UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/19 "2020-07-25T04:17:57Z")

</div>

@Xperez I followed your steps to install yarn. But faced this problem:

 ![Screenshot from 2020-07-25 09-46-14](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/c/c22c8a77a0e7aa933c8b93ae230966ee44b0e8b8.png)

---

<div class="post-metadata">

### Author: ![kritika\_arora](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/kritika_arora/32/965_2.png) [@kritika\_arora](https://discuss.openedx.org/u/kritika_arora)
#### Post date: [July 25, 2020, 4:19am UTC](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142/20 "2020-07-25T04:19:46Z")

</div>

Followed above steps to install yarn but faced this problem. I have native ironwood installation

 ![Screenshot from 2020-07-25 09-46-14](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/c/c22c8a77a0e7aa933c8b93ae230966ee44b0e8b8.png)

[Next page](https://discuss.openedx.org/t/how-to-install-figures-appsembler/2142.md?page=2)
