# PyCall pyimport fails to import python submodules when embedding in C#

**URL:** <https://discourse.julialang.org/t/pycall-pyimport-fails-to-import-python-submodules-when-embedding-in-c/2191>\
**Category:** General Usage\
**Tags:** pycall, embedding\
**Created:** [February 20, 2017, 5:02pm UTC](https://discourse.julialang.org/t/pycall-pyimport-fails-to-import-python-submodules-when-embedding-in-c/2191 "2017-02-20T17:02:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stemann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stemann/32/4030_2.png) [@stemann](https://discourse.julialang.org/u/stemann)\
**Post date:** [February 20, 2017, 5:02pm UTC](https://discourse.julialang.org/t/pycall-pyimport-fails-to-import-python-submodules-when-embedding-in-c/2191/1 "2017-02-20T17:02:25Z")

</div>

Hi,

We have stumbled upon a puzzling case where we are unable to import python submodules when embedding Julia in C#, e.g.  
`@pyimport skimage.draw as draw`  
works just fine in the Julia (0.5) REPL, but gives a null pointer when embedding in C# (using the C-interface via SWIG) - called from `jl_eval_string`.  
`pyimport(:skimage)[:draw]` also gives a null pointer.  
Using `jl_exception_occurred()` we have gathered that we get a KeyError (key not found) - so it seems PyCall is unable to find the given Python child-module - whereas the parent-module is found just fine.

We are running Julia 0.5 x64 on Windows - and PyCall is using Conda.jl.

Any ideas would be highly appreciated.
