Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no module named error #13

Closed
martinberoiz opened this issue Sep 3, 2015 · 11 comments
Closed

no module named error #13

martinberoiz opened this issue Sep 3, 2015 · 11 comments

Comments

@martinberoiz
Copy link

Hello,

Right after installing yagmail with pip install I get this error as soon as I import the module:

import yagmail
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/yagmail/init.py", line 6, in
from .yagmail import SMTP
File "/usr/local/lib/python2.7/site-packages/yagmail/yagmail.py", line 16, in
from .validate import validate_email_with_regex
File "/usr/local/lib/python2.7/site-packages/yagmail/validate.py", line 31, in
from yagmail.error import YagInvalidEmailAddress
ImportError: No module named error

What could this be?

@kootenpv
Copy link
Owner

kootenpv commented Sep 3, 2015

Could you try rerunning it with pip install -U yagmail? I thought this should be solved by now by using from __future__ import absolute_import at the top of the script in the latest update. It also seems like it passes the tests on python 2.7 (see Travis CI).

@martinberoiz
Copy link
Author

Oh, ok. It must be just me then. I tried with -U option but didn't work either.
Thanks.

@kootenpv
Copy link
Owner

kootenpv commented Sep 3, 2015

Actually, thanks for raising an issue! It apparently wasn't working for Python 2.7

I guess somehow the test didn't catch it.

See also the following issue:

4a43497

It has been rolled back, so now you can for sure install it (but it certainly bothers me that it doesn't look nice).

Let me know if it works, then I'll close it.

@wingnut2626
Copy link

Hello, I have installed yagmail via

sudo pip3 install yagmail

on my system. I am getting an ImportError with no module of that name. Any ideas?

###IF ANYONE ELSE HAS THIS PROBLEM THIS INSTALLS TO PYTHON 3.5 ON UBUNTU ###

@kootenpv
Copy link
Owner

kootenpv commented Dec 2, 2015

@wingnut2626 Try to update to a newer version perhaps: sudo pip3 install -U yagmail

@guigashm
Copy link

Hello,

I had a similar issue, solved by using sudo.

I used:
sudo pip install yagmail

In the yagmail GIT page, probably the instructions should have:

sudo pip install yagmail
sudo pip3 install yagmail

@kootenpv
Copy link
Owner

@guigashm Strange, I'm able to install without sudo on a new system. I'm out of ideas. But I took your advice into the README at the errors section. Thanks for posting.

@Lvl4Sword
Copy link

I would suggest not using sudo to pip install anything. Do you have another file called error.py?

Doing the following works on Debian 9:

  • virtualenv -p python3 yagmail_venv
  • ~/yagmail_venv/bin/pip install yagmail
  • python3
  • import yagmail

@kootenpv
Copy link
Owner

I think this is not an issue anymore? Feel free to reopen.

@jerzybrzoska
Copy link

jerzybrzoska commented Sep 4, 2021

Yeah, it started to happen again:

ModuleNotFoundError: No module named 'yagmail'

Didn't happen last year. though. I installed it via pip3 install yagmail. pip3 install -U yagmail does not help at all.

@kootenpv
Copy link
Owner

kootenpv commented Sep 4, 2021

Yeah, it started to happen again:

ModuleNotFoundError: No module named 'yagmail'

Didn't happen last year. though. I installed it via pip3 install yagmail. pip3 install -U yagmail does not help at all.

Did you try python3 afterwards, i.e. the same version as pip3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants