# Importing a Python Module from another directory

**URL:** <https://discourse.julialang.org/t/importing-a-python-module-from-another-directory/28310>\
**Category:** New to Julia\
**Tags:** pycall\
**Created:** [September 3, 2019, 1:21am UTC](https://discourse.julialang.org/t/importing-a-python-module-from-another-directory/28310 "2019-09-03T01:21:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [September 3, 2019, 12:25pm UTC](https://discourse.julialang.org/t/importing-a-python-module-from-another-directory/28310/3 "2019-09-03T12:25:11Z")

</div>

> [@marinarrd](#):
>
> I would like to use python module from another directory.

You could push the directory to Python’s `sys.path` and then import the module:

```julia
using PyCall
push!(pyimport("sys")."path", "/path/of/directory")
mymodule = pyimport("mymodule")

```

---

_[View the full topic](https://discourse.julialang.org/t/importing-a-python-module-from-another-directory/28310)._
