# How to load Dependencies

**URL:** https://discuss.tryton.org/t/how-to-load-dependencies/1877
**Category:** Developer
**Created:** [October 24, 2019, 10:05am UTC](https://discuss.tryton.org/t/how-to-load-dependencies/1877 "2019-10-24T10:05:30Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![prashasti.sharma](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/p/58f4c7/32.png) [@prashasti.sharma](https://discuss.tryton.org/u/prashasti.sharma)
#### Post date: [October 24, 2019, 10:05am UTC](https://discuss.tryton.org/t/how-to-load-dependencies/1877/1 "2019-10-24T10:05:30Z")

</div>

Sir,  
What changes made in setup.py of a particular module, so that on installing setup.py of that particular module the dependencies of other module on which this module depends are installed directly.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [October 24, 2019, 10:19am UTC](https://discuss.tryton.org/t/how-to-load-dependencies/1877/2 "2019-10-24T10:19:16Z")

</div>

If you use our [cookiecutter template](https://hg.tryton.org/cookiecutter) other tryton modules are automatically managed.

Otherwise you should add your dependencies on `requires` section of setup.py

Hope it helps

---

<div class="post-metadata">

### Author: ![prashasti.sharma](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/p/58f4c7/32.png) [@prashasti.sharma](https://discuss.tryton.org/u/prashasti.sharma)
#### Post date: [October 24, 2019, 11:11am UTC](https://discuss.tryton.org/t/how-to-load-dependencies/1877/3 "2019-10-24T11:11:46Z")

</div>

Sir,  
Is there any module which i can refer to, and see it’s setup.py.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [October 24, 2019, 11:24am UTC](https://discuss.tryton.org/t/how-to-load-dependencies/1877/4 "2019-10-24T11:24:49Z")

</div>

You can have a look at the [setup.py of the product\_price\_list](https://hg.tryton.org/modules/product_price_list/file/a8b1c36591ab/setup.py) module for example. But any other tryton module uses the same pattern.

---

<div class="post-metadata">

### Author: ![prashasti.sharma](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/p/58f4c7/32.png) [@prashasti.sharma](https://discuss.tryton.org/u/prashasti.sharma)
#### Post date: [October 25, 2019, 10:06am UTC](https://discuss.tryton.org/t/how-to-load-dependencies/1877/5 "2019-10-25T10:06:31Z")

</div>

Sir,

What do I write in setup.py in order to install dependencies if they are locally present in the system(cloned from a repository)?

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [October 25, 2019, 10:24am UTC](https://discuss.tryton.org/t/how-to-load-dependencies/1877/6 "2019-10-25T10:24:45Z")

</div>

> [@prashasti.sharma](#):
>
> What do I write in setup.py in order to install dependencies if they are locally present in the system(cloned from a repository)?

You should install the dependency after cloing from a repository. If the dependency is already installed it won’t be reinstalled by the setup scripts

---

<div class="post-metadata">

### Author: ![prashasti.sharma](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/p/58f4c7/32.png) [@prashasti.sharma](https://discuss.tryton.org/u/prashasti.sharma)
#### Post date: [November 1, 2019, 6:16am UTC](https://discuss.tryton.org/t/how-to-load-dependencies/1877/7 "2019-11-01T06:16:32Z")

</div>

Sir, my question is how to load the dependencies of the module which are given in it’s tryton.cfg automatically when we load the module.

 ![Screenshot%20from%202019-11-01%2011-42-46](https://discuss-cdn.tryton.org/uploads/default/original/1X/adabaf1c794282fa268489bdc98af9340c9cc93b.png) in this example how will the hr\_payroll and hr\_hra will automatically be loaded on installing the hr\_cea module. What changes should be made in setup.py.

---

<div class="post-metadata">

### Author: ![prashasti.sharma](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/p/58f4c7/32.png) [@prashasti.sharma](https://discuss.tryton.org/u/prashasti.sharma)
#### Post date: [November 1, 2019, 6:41am UTC](https://discuss.tryton.org/t/how-to-load-dependencies/1877/8 "2019-11-01T06:41:22Z")

</div>

Without loading them separately.

---

<div class="post-metadata">

### Author: ![nicoe](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/nicoe/32/2880_2.png) [@nicoe](https://discuss.tryton.org/u/nicoe)
#### Post date: [November 1, 2019, 9:09am UTC](https://discuss.tryton.org/t/how-to-load-dependencies/1877/9 "2019-11-01T09:09:58Z")

</div>

I think you’re mixing a lot of concepts.

If you’re talking about the concept of downloading and installing the dependencies of a python package. This is not a Tryton related question so this answer is valid for any python package. You should use `pip`. Something like `pip install trytond-account-payment-stripe` will install the `account_payment_stripe` Tryton module (which is also a python package) and all its dependencies.

In order for `pip` to know the dependencies they must be defined into `setup.py`. The standard `setup.py` script provided by Tryton modules parses the `tryton.cfg` file and defines correctly the tryton part of the information in `setup.py`, you will need to specify third-party python packages that you use manually. Keep in mind that pip uses [pypi](https://pypi.org/) to fetch the packages so you have to publish them there first (they might be already published).
