# Modules path in config

**URL:** https://discuss.tryton.org/t/modules-path-in-config/4519
**Category:** Ideas
**Created:** [August 5, 2021, 8:28am UTC](https://discuss.tryton.org/t/modules-path-in-config/4519 "2021-08-05T08:28:54Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![hedererjs](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/h/7ea924/32.png) [@hedererjs](https://discuss.tryton.org/u/hedererjs)
#### Post date: [August 5, 2021, 8:28am UTC](https://discuss.tryton.org/t/modules-path-in-config/4519/1 "2021-08-05T08:28:54Z")

</div>

Could we have a config option to define additional paths where to search for modules?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 5, 2021, 11:54am UTC](https://discuss.tryton.org/t/modules-path-in-config/4519/2 "2021-08-05T11:54:37Z")

</div>

I do not think so. We want to stick with standard Python.  
So you can use standard Python tools to install your modules the way you want like using venv, `PYTHONPATH`, `.local` etc.

---

<div class="post-metadata">

### Author: ![hedererjs](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/h/7ea924/32.png) [@hedererjs](https://discuss.tryton.org/u/hedererjs)
#### Post date: [August 20, 2021, 5:44am UTC](https://discuss.tryton.org/t/modules-path-in-config/4519/3 "2021-08-20T05:44:27Z")

</div>

Ok thanks for reply. Coming back to dev, I’ve tried using PYTHONPATH with tryton docker using a volume with modules.  
Problem: trytond-admin has not seen new modules. If I add a symbolic link in /usr/local/lib/python3.7/dist-packages/trytond/modules to a new module, I have no problem with trytond-admin. My conclusion is that there is a problem with searching trytond modules in PYTHONPATH

For .local, I don’t see what you intend to do. Adding a “/home/trytond/.local/trytond” folder with modules?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 20, 2021, 6:25am UTC](https://discuss.tryton.org/t/modules-path-in-config/4519/4 "2021-08-20T06:25:25Z")

</div>

trytond search for modules only in its `modules` directory or via entry-points.  
If you are using docker image, you should customize the docker image to install the modules you need.

---

<div class="post-metadata">

### Author: ![hedererjs](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/h/7ea924/32.png) [@hedererjs](https://discuss.tryton.org/u/hedererjs)
#### Post date: [August 20, 2021, 10:36am UTC](https://discuss.tryton.org/t/modules-path-in-config/4519/5 "2021-08-20T10:36:33Z")

</div>

> [@ced](#):
>
> via entry-points.

You mean with symbolic links in “modules” directory?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 20, 2021, 11:46am UTC](https://discuss.tryton.org/t/modules-path-in-config/4519/6 "2021-08-20T11:46:53Z")

</div>

No I really mean [Entry Points](https://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points) in the group `trytond.modules`.

---

<div class="post-metadata">

### Author: ![hedererjs](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/h/7ea924/32.png) [@hedererjs](https://discuss.tryton.org/u/hedererjs)
#### Post date: [August 23, 2021, 6:50pm UTC](https://discuss.tryton.org/t/modules-path-in-config/4519/7 "2021-08-23T18:50:53Z")

</div>

Ok but this is with setup.py when installing module.  
So for development, there is only the symbolic link solution?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 23, 2021, 9:07pm UTC](https://discuss.tryton.org/t/modules-path-in-config/4519/8 "2021-08-23T21:07:08Z")

</div>

> [@hedererjs](#):
>
> So for development, there is only the symbolic link solution?

I do not know. I never understood how it could be preferred to use a docker image for development.

---

<div class="post-metadata">

### Author: ![hedererjs](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/h/7ea924/32.png) [@hedererjs](https://discuss.tryton.org/u/hedererjs)
#### Post date: [August 23, 2021, 11:42pm UTC](https://discuss.tryton.org/t/modules-path-in-config/4519/9 "2021-08-23T23:42:41Z")

</div>

I speak globally, not with docker in mind

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 24, 2021, 7:11am UTC](https://discuss.tryton.org/t/modules-path-in-config/4519/10 "2021-08-24T07:11:37Z")

</div>

When developing custom module, we usually use just a [virtual environment](https://docs.python.org/3/library/venv.html) and install the developed module using `python setup.py develop`.

When developing on standard module, we still use a virtual environment but just install the `requirements.txt` and `requirements-dev.txt` generated by the `.hooks/update_requirements` of [https://hg.tryton.org/tryton-env/](https://hg.tryton.org/tryton-env/) repository.
