jegesh / python-sqs-listener

A simple wrapper for boto3 for listening, and sending, to an AWS SQS queue
Other
154 stars 71 forks source link

sqs_listener not found #32

Closed theCompanyDream closed 4 years ago

theCompanyDream commented 5 years ago

I've been getting this error for the SqsListener saying that it doesn't exist for some reason even when I pip install pip install pySqsListener. Below is the error and code used to run the code.

File "./run.py", line 1, in <module>
    from sqs_listener import SqsListener
ModuleNotFoundError: No module named 'sqs_listener'
from sqs_listener import SqsListener
from src import image_handler, dev_log, ApiEndpoints, TrainingFile

# host address
target_address = 'api.foyerapp.io'

# will get access token
api = ApiEndpoints(target_address)

# Build Model Training Files
training = TrainingFile()

class ImageLabelingListener(SqsListener):
    def handle_message(self, body, attributes, messages_attributes):
        image_handler(api, training, *[body])

listener = ImageLabelingListener('ImageTagging', region_name='us-east-1', queue_url='https://sqs.us-east-1.amazonaws.com/618135106065/ImageTagging')
listener.listen()

Below I've also tried running pip freeze and get the same error.

asn1crypto==0.24.0
boto3==1.9.122
botocore==1.12.122
certifi==2019.3.9
chardet==3.0.4
cryptography==2.1.4
docutils==0.14
enum34==1.1.6
futures==3.2.0
idna==2.8
ipaddress==1.0.17
jmespath==0.9.4
keyring==10.6.0
keyrings.alt==3.0
numpy==1.16.2
pycrypto==2.6.1
pygobject==3.26.1
pySqsListener==0.8.7
python-dateutil==2.8.0
pyxdg==0.25
requests==2.21.0
s3transfer==0.2.0
SecretStorage==2.3.1
six==1.12.0
tf==1.0.0
urllib3==1.24.1
jegesh commented 5 years ago

I seems that the library isn't being installed into your environment. Are you sure you're running the code in the same environment as the listener library is installed? Are you using a virtual environment of some kind?

jegesh commented 4 years ago

Closing due to lack of activity