Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #103253
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
| Newsgroups | comp.lang.python |
| Subject | Re: [newbie] Problem with matplotlib |
| Date | Sat, 20 Feb 2016 08:42:41 +0000 |
| Lines | 56 |
| Message-ID | <mailman.16.1455957803.13884.python-list@python.org> (permalink) |
| References | <1751492a-45ae-422d-8819-17de767a94c4@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de 13zmpA8/KAAAmU6G/YrQwwTWb2f8B2bZeSYU3ICds2ZA== |
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; 'win32': 0.03; 'from:addr:yahoo.co.uk': 0.05; 'pyplot': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'throw': 0.09; 'advance': 0.10; 'python': 0.10; '36,': 0.16; 'hits': 0.16; 'inclined': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:Problem': 0.16; 'wrote:': 0.16; 'attribute': 0.18; 'language': 0.19; 'subject:] ': 0.19; '>>>': 0.20; 'skip:" 30': 0.20; 'lawrence': 0.22; 'trying': 0.22; 'bit': 0.23; 'import': 0.24; '(most': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'error': 0.27; "skip:' 10": 0.28; 'decimal': 0.29; 'solution,': 0.29; "i'm": 0.30; 'certain': 0.31; 'another': 0.32; 'language.': 0.32; 'problem': 0.33; 'skip:_ 30': 0.33; 'traceback': 0.33; "skip:' 20": 0.34; 'file': 0.34; 'could': 0.35; 'skip:" 50': 0.35; 'problem.': 0.35; 'to:addr:python-list': 0.36; 'thanks': 0.37; 'received:org': 0.37; 'one,': 0.37; 'someone': 0.38; 'enough': 0.39; 'to:addr:python.org': 0.40; 'mark': 0.40; 'subject:with': 0.40; 'engine': 0.62; 'email addr:gmail.com': 0.62; 'charset:windows-1252': 0.62; 'more': 0.63; 'our': 0.64; 'here': 0.66; 'contour': 0.84; 'pythonistas,': 0.84 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| X-Gmane-NNTP-Posting-Host | 80.234.182.166 |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
| In-Reply-To | <1751492a-45ae-422d-8819-17de767a94c4@googlegroups.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21rc2 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:103253 |
Show key headers only | View raw
On 20/02/2016 07:42, jenswaelkens@gmail.com wrote: > When I use either of the following commands I get an error for which I don't have a solution, could someone here help me further? > These are the commands: > import matplotlib.pyplot as plt Are you certain that this is what you typed? C:\Users\Mark\Desktop>py -2.7 Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib.pyplot as plt >>> Please have another go. > > or > > from matplotlib.pyplot import pyplot as plt The above is incorrect, you are trying to import 'pyplot' from 'matplotlib.pyplot'. > > This is the error I get: > Traceback (most recent call last): > File "/home/waelkens/matplotlibdemo.py", line 2, in <module> > from matplotlib.pyplot import pyplot as plt > File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 27, in <module> > import matplotlib.colorbar > File "/usr/lib/python2.7/dist-packages/matplotlib/colorbar.py", line 36, in <module> > import matplotlib.contour as contour > File "/usr/lib/python2.7/dist-packages/matplotlib/contour.py", line 17, in <module> > import matplotlib.ticker as ticker > File "/usr/lib/python2.7/dist-packages/matplotlib/ticker.py", line 152, in <module> > import decimal > File "/usr/lib/python2.7/decimal.py", line 3744, in <module> > _numbers.Number.register(Decimal) > AttributeError: 'module' object has no attribute 'Number' > > thanks in advance > Jens > With this type of problem I'm inclined to throw the last line of the traceback, here the 'AttributeError' one, into a search engine and see what you come up with. The hits you get are often enough to help you diagnose the problem. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[newbie] Problem with matplotlib jenswaelkens@gmail.com - 2016-02-19 23:42 -0800
Re: [newbie] Problem with matplotlib Dave Farrance <df@see.replyto.invalid> - 2016-02-20 08:30 +0000
Re: [newbie] Problem with matplotlib Dave Farrance <df@see.replyto.invalid> - 2016-02-20 08:49 +0000
Re: [newbie] Problem with matplotlib Dave Farrance <df@see.replyto.invalid> - 2016-02-20 09:19 +0000
Re: [newbie] Problem with matplotlib jenswaelkens@gmail.com - 2016-02-20 09:02 -0800
Re: [newbie] Problem with matplotlib Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-02-20 08:42 +0000
Re: [newbie] Problem with matplotlib jenswaelkens@gmail.com - 2016-02-20 09:05 -0800
csiph-web