By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,345 Members | 1,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,345 IT Pros & Developers. It's quick & easy.

How to import xplt, pylab?

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.