Import error
Steven D'Aprano
steve at pearwood.info
Tue Apr 5 06:14:07 EDT 2016
On Tue, 5 Apr 2016 07:53 pm, Nicolae Morkov wrote:
> What can I do ,,,, I've tried everything
You can start by telling us what you are trying to do, and what error you
are getting.
- What module are you trying to import?
- Are you sure it is installed? How do you know?
- What command do you give to import it? COPY and PASTE it, don't
type it out from memory.
- What happens? Do you get an error? What EXACT error message do
you get? COPY and PASTE the entire error, starting from the
line "Traceback", don't summarise it or retype it from memory.
Good question, with a useful answer:
Question: I'm trying to import the maths module, so I write `import maths`,
and I get this traceback:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'maths'
Answer: Try `import math` without the S.
Bad question, with no useful answers:
Question: "It doesn't work!!!!! What am I doing wrong????"
--
Steven
More information about the Python-list
mailing list