471,350 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

How to import xplt, pylab?

Hello,

I'm newbie to python.

So far, I'm a bit disappointed. It's awful to set Python up to work.
It's not working!!!

Ok, calm down. Here are my settings:
I'm using Windows XP machine and have installed
Python 2.5.1.
Also, I have also installed something called "Cygwin" to type
in my commands.
Finally, I have installed scipy-0.6.0.

After starting Cygin I type

python
import math
import scipy
*****************************************
Then I try

import xplt

and get the message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named xplt
*****************************************

Also I try

import pylab

and get the message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pylab

*****************************************

So, how can I use xplt and pylab???!!!!

Any help would be much appreciated!!!

Thank you,
Caren
Nov 22 '07 #1
3 5543
On Thu, Nov 22, 2007 at 02:00:00PM -0800, Caren Balea wrote regarding How to import xplt, pylab?:
>
Hello,

I'm newbie to python.

So far, I'm a bit disappointed. It's awful to set Python up to work.
It's not working!!!

Ok, calm down. Here are my settings:
I'm using Windows XP machine and have installed
Python 2.5.1.
Also, I have also installed something called "Cygwin" to type
in my commands.
Finally, I have installed scipy-0.6.0.

After starting Cygin I type

python
import math
import scipy
*****************************************
Then I try

import xplt

and get the message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named xplt
*****************************************
xplt is a module within scipy, so it will not be available at the top level. However, all you need to do is

py>>from scipy.sandbox import xplt

or

py>>import scipy.sandbox.xplt

The advantage of the former is that you can just use the names xplt.*, while with the latter you have to type scipy.sandbox.xplt.*.
Also I try

import pylab

and get the message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pylab

*****************************************
I haven't worked with pylab, but it looks like you may need another install (matplotlib?) I'm not sure. I just did a quick google search.
So, how can I use xplt and pylab???!!!!

Any help would be much appreciated!!!

Thank you,
Caren
Happy Thankgiving hacking!

Cheers,
Cliff
Nov 22 '07 #2
On 22 Nov, 23:17, "J. Clifford Dyer" <j...@sdf.lonestar.orgwrote:
On Thu, Nov 22, 2007 at 02:00:00PM -0800, Caren Balea wrote regarding How to import xplt, pylab?:


Hello,
I'm newbie to python.
So far, I'm a bit disappointed. It's awful to set Python up to work.
It's not working!!!
Ok, calm down. Here are my settings:
I'm using Windows XP machine and have installed
Python 2.5.1.
Also, I have also installed something called "Cygwin" to type
in my commands.
Finally, I have installed scipy-0.6.0.
After starting Cygin I type
python
import math
import scipy
*****************************************
Then I try
import xplt
and get the message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named xplt
*****************************************

xplt is a module within scipy, so it will not be available at the top level. However, all you need to do is

py>>from scipy.sandbox import xplt

or

py>>import scipy.sandbox.xplt

The advantage of the former is that you can just use the names xplt.*, while with the latter you have to type scipy.sandbox.xplt.*.
Also I try
import pylab
and get the message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pylab
*****************************************

I haven't worked with pylab, but it looks like you may need another install (matplotlib?) I'm not sure. I just did a quick google search.
So, how can I use xplt and pylab???!!!!
Any help would be much appreciated!!!
Thank you,
Caren

Happy Thankgiving hacking!

Cheers,
Cliff
Thank you. I've tried both suggestions.
But they both don't work :(

Here are the outputs:
>>import math
import scipy
from scipy.sandbox import xplt
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
from scipy.sandbox import xplt
ImportError: cannot import name xplt
>>import scipy.sandbox.xplt
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import scipy.sandbox.xplt
ImportError: No module named xplt
Nov 22 '07 #3
On Nov 23, 8:03 pm, Robert Kern <robert.k...@gmail.comwrote:
>
In any case, xplt has been deprecated for a long time. It probably doesn't work.
I don't recommend using it unless if you want to take on the responsibility of
maintaining it.

--
BTW, does she need help with importing a module or with plotting some
graph ? :-)
Nov 24 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Mathias | last post: by
1 post views Thread by jean.rossier | last post: by
2 posts views Thread by Charles Krug | last post: by
6 posts views Thread by googlinggoogler | last post: by
reply views Thread by Petr Jakes | last post: by
11 posts views Thread by Connelly Barnes | last post: by
6 posts views Thread by =?ISO-8859-1?Q?Sch=FCle_Daniel?= | last post: by
3 posts views Thread by Willem-Jan Vriend | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.