Python Error: “ImportError: No module named six”

前端 未结 7 803
清酒与你
清酒与你 2020-12-20 13:18

I am running Python 2.7 on a Windows 7 OS

Here is what I run:

>>> import matplotlib.pyplot as plt

Then I get this:

7条回答
  •  旧巷少年郎
    2020-12-20 14:07

    You need to install it on your system. This basically means putting the zip file where Python can find it, but by far the easiest way is pip install six. This will download it a second time, though.

    Like the matplotlib installation instructions mention, six is a dependency of the dateutil package. Most sane installation methods would pull in this dependency automatically; if you had done pip install python-dateutil in the first place, this missing dependency should have been satisfied behind the scenes. If you require a completely manual installation, you should give those instructions a thorough read.

提交回复
热议问题