No module named - Python

Asked

Viewed 487 times

0

Hello, I did the installation of mailchimp3 this way:

pip install mailchimp3

And also from Makilchimp:

pip install mailchimp

They did not present any error.

When I’m going to perform the tapeworm in python:

from mailchimp3 import MailChimp

client = MailChimp('YOUR_USERNAME', 'YOUR_SECRET_KEY')
client.lists.members.all('YOUR_LIST_ID', get_all=True, fields="members.email_address")

Returns the error:

Exception has occurred: Modulenotfounderror No module named 'mailchimp3'

Has anyone been there? Thank you!

  • It is very likely that the python environment Pip installed the libs on is not the same as the code being executed. Tried to do all this in a virtualenv? If so, check if the env was activated with source bin/activate ?

  • Hello @fernandosavio, I just started using python. What is a virtualenv? I am using Anaconda Navigator and running the code through Vscode.

  • You also installed version 2 of Mailchimp after installing version 3, remove it with "Pip Uninstall Mailchimp" and reinstall version 3.

  • I’ve never worked with Anaconda Navigator, you probably need to use it to choose the right development environment (Docs).

  • @Giovanninunes Thank you very much! Solved the problem.

  • I will turn my comment in response.

Show 1 more comment

1 answer

0


You also installed version 2 of Mailchimp after installation of version 3, remove it with pip uninstall mailchimp and reinstall version 3.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.