Pythonista-Issues icon indicating copy to clipboard operation
Pythonista-Issues copied to clipboard

No Module Found for pyminizip

Open css459 opened this issue 5 years ago • 4 comments
trafficstars

Hello Pythonista,

I am trying to encrypt a file using Pythonista and I see that pyminizip is included as part of the app. However, when I try to import this module as import pyminizip I receive a Module not found error. It does however show up in the tab completion within the editor, but not the REPL. Is this related to Pythonista, or can I fix it on my end? Thanks for your help.

— Cole

Traceback:

Traceback (most recent call last):
  File "/private/var/mobile/Containers/Shared/AppGroup/3BE409B0-66B3-41A2-9200-B11FC9CCF68C/Pythonista3/Documents/test.py", line 1, in <module>
    import pyminizip
ModuleNotFoundError: No module named 'pyminizip'

css459 avatar Sep 03 '20 04:09 css459

Look up https://pypi.org/project/pyminizip/ on PyPI (which is where pip will get the package from) and follow the Homepage link to https://github.com/smihica/pyminizip and look at the Languages section. This package is written in C, Assembly, C++, and C# so it is not pure Python and can not be pip installed on Pythonista.

cclauss avatar Sep 03 '20 05:09 cclauss

As the issue states, this is not about installing pyminizip, but the fact that you cannot import it even if it shows up in the editor as a completion suggestion.

As a workaround, there is the zipfile package that can be used to create and process ZIP files.

holvi-mikael avatar Sep 03 '20 07:09 holvi-mikael

As the reply states, the pip install of pyminzip failed.

cclauss avatar Sep 03 '20 07:09 cclauss

Right that’s fine, but if that is the case, you should remove it from your included packages list. I wasn’t attempting to install it since it states there that it is included. Thank you for including an explanation though!

css459 avatar Sep 03 '20 15:09 css459