5

Alright, so, what I'm trying to do is import a module in folders packed inside of a .pyd file. Here is something that would work for me:

from apple import __init__

With apple being the .pyd in the same directory as the Python script, and __init__ of course being packed inside of the .pyd. This would work, however here is what I want to do, but doesn't work:

from apple.seed.worm import WormManager

Explanation: apple = pyd, seed = directory in the pyd, worm = directory in seed directory in apple pyd, WormManager = python module in the worm directory.

However, it does not work, and results in a module not found ImportError thinking that seed is a module (and there was an __init__ inside of the seed directory before it was packed). Of course it exists and is packed in the .pyd, but it simply does not work. I even did this:

from apple.seed import __init__

but not even that works so I know that I'm not importing this right.

I really could not find the correct syntax for getting this to work on the internet, and of course I know how to do this without a pyd involved, so any help?

billyands55
  • 93
  • 2
  • 7
  • Possible duplicate of [ImportError while importing a python file in a pyd](http://stackoverflow.com/questions/32546652/importerror-while-importing-a-python-file-in-a-pyd) – gaborous Oct 03 '16 at 00:03

0 Answers0