Skip to content
Advertisement

Python: Crypto package error: “No module called ‘_number_new'”

I have a software which installs its own local Python 3.9. Included in its python39/lib/site-packages is Crypto package, which causes errors and seems old and incompatible with Python 3.9. It includes long integers, like 1L, which I fixed by removing the “L”. But I’m still getting the error below, even though the file

JavaScript

exists. For now, I’m trying to fix such errors manually, to avoid dealing with other incompatibility issues that will show up, if I try to update the whole Crypto package. The line in number.py:

JavaScript

Error message:

JavaScript

…python39libsite-packagesCryptoUtil listing:

libsite-packagesCryptoUtil

Advertisement

Answer

Modules in packages can be accessed using dot notation, so you just need to:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement