Problem with Python Crypto package

Posted on
Wed Oct 12, 2022 2:50 pm
racarter offline
User avatar
Posts: 477
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Problem with Python Crypto package

I'm developing a plugin which needs the Python Crypto package. Installing it under Python3 in Terminal works fine, and my test code runs perfectly, but if I include the Crypto package in my plugin folder and run the same code in my plugin I get an error message:

Cannot load native module 'Crypto.Cipher._raw_ecb': Not found '_raw_ecb.cpython-310-darwin.so', Not found '_raw_ecb.abi3.so', Not found '_raw_ecb.so'

I've tried using Cryptodome but get the same result.

Any advice gratefully received!

Posted on
Wed Oct 12, 2022 4:25 pm
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Problem with Python Crypto package

Are you saying that you can see those files in your plugin tree but can't load them?

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Oct 12, 2022 11:16 pm
racarter offline
User avatar
Posts: 477
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Problem with Python Crypto package

No, that's the weird thing. I've run searches and the only one of the files I can find is _raw_ecb.abi3.so, which is in the Crypto/Cipher folder as expected.

I thought it might be an M1 issue, but I've tried the same thing on my non-M1 dev machine and get the same result.

Posted on
Wed Oct 12, 2022 11:59 pm
GlennNZ offline
User avatar
Posts: 1572
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Problem with Python Crypto package

The cryto package installs relevant binaries. Typically have to pip3 install it for plugins.

I need to use it for a couple - and are stuck with pip3 for the moment….

Glenn


Sent from my iPad using Tapatalk

Posted on
Thu Oct 13, 2022 2:07 am
racarter offline
User avatar
Posts: 477
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Problem with Python Crypto package

Hi Glenn

Tried that but got the same error - until it occurred to me to delete the package from my plugin folder!

Thanks for the info. :)

Posted on
Thu Oct 13, 2022 2:14 am
GlennNZ offline
User avatar
Posts: 1572
Joined: Dec 07, 2014
Location: Central Coast, Australia

Problem with Python Crypto package

racarter wrote:
I'm developing a plugin which needs the Python Crypto package. Installing it under Python3 in Terminal works fine, and my test code runs perfectly, but if I include the Crypto package in my plugin folder and run the same code in my plugin I get an error message:

Cannot load native module 'Crypto.Cipher._raw_ecb': Not found '_raw_ecb.cpython-310-darwin.so', Not found '_raw_ecb.abi3.so', Not found '_raw_ecb.so'

I've tried using Cryptodome but get the same result.

Any advice gratefully received!
Ok.
Must have missed something.

Edit:
See the deletion of package - yep that would do it!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 12 guests