Skip to content

Running samples: ModuleNotFoundError: No module named 'Crypto' #42

@agawronski

Description

@agawronski

Hi trying to follow the basic instructions to test the sample code.

From: https://github.com/CyberSource/cybersource-rest-samples-python

trying to run: Running the Samples From the Command Line

git clone https://github.com/CyberSource/cybersource-rest-samples-python.git

pip3 install cybersource-rest-client-python

# Install the Sample Codes (required for running Authentication samples only)
cd cybersource-rest-samples-python
pip3 install -e .


python3 samples/RiskManagement/DecisionManager/mark-as-suspect.py

Traceback (most recent call last):
  File "samples/RiskManagement/DecisionManager/mark-as-suspect.py", line 1, in <module>
    from CyberSource import *
  File "C:\Users\agawronski\AppData\Local\Programs\Python\Python37\lib\site-packages\CyberSource\__init__.py", line 686, in <module>
    from .utilities.flex.token_verification import TokenVerification
  File "C:\Users\agawronski\AppData\Local\Programs\Python\Python37\lib\site-packages\CyberSource\utilities\__init__.py", line 4, in <module>
    from .flex.token_verification import TokenVerification
  File "C:\Users\agawronski\AppData\Local\Programs\Python\Python37\lib\site-packages\CyberSource\utilities\flex\__init__.py", line 4, in <module>
    from .token_verification import TokenVerification
  File "C:\Users\agawronski\AppData\Local\Programs\Python\Python37\lib\site-packages\CyberSource\utilities\flex\token_verification.py", line 1, in <module>
    from . import rsa_verify
  File "C:\Users\agawronski\AppData\Local\Programs\Python\Python37\lib\site-packages\CyberSource\utilities\flex\rsa_verify.py", line 1, in <module>
    from Crypto.PublicKey import RSA
ModuleNotFoundError: No module named 'Crypto'

All of the commands prior to running mark-as-suspect.py were successful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions