# Importing a .py file not working

**URL:** <https://discourse.julialang.org/t/importing-a-py-file-not-working/51366>\
**Category:** General Usage\
**Tags:** pycall\
**Created:** [December 6, 2020, 8:35pm UTC](https://discourse.julialang.org/t/importing-a-py-file-not-working/51366 "2020-12-06T20:35:23Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Volker](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Volker](https://discourse.julialang.org/u/Volker)\
**Post date:** [December 8, 2020, 6:30am UTC](https://discourse.julialang.org/t/importing-a-py-file-not-working/51366/7 "2020-12-08T06:30:58Z")

</div>

For me the problem was solved by downgrading the Python version of 3.7 to 3.6 ([https://techytok.com/lesson-interacting-with-python/](https://techytok.com/lesson-interacting-with-python/))

See in:

> [@Importing a Python Module from another directory](https://discourse.julialang.org/t/importing-a-python-module-from-another-directory/28310/3):
>
> You could push the directory to Python’s sys.path and then import the module: using PyCall push!(pyimport("sys")."path", "/path/of/directory") mymodule = pyimport("mymodule")

---

_[View the full topic](https://discourse.julialang.org/t/importing-a-py-file-not-working/51366)._
