How to import xplt, pylab?

C

Caren Balea

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
 
J

J. Clifford Dyer

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
 
C

Caren Balea

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.*.





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.




Happy Thankgiving hacking!

Cheers,
Cliff

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

Here are the outputs:

Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
from scipy.sandbox import xplt
ImportError: cannot import name xplt
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import scipy.sandbox.xplt
ImportError: No module named xplt
 
D

Dennis Lee Bieber

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

Here are the outputs:


Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
from scipy.sandbox import xplt
ImportError: cannot import name xplt

Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import scipy.sandbox.xplt
ImportError: No module named xplt

I just redownloaded and installed scipy/numpy (I was getting an
error on a "del lib" during the scipy import).

Based upon the contents of scipy.sandbox, NONE of the sandbox
modules are available in the Windows binary install for Python 2.4...
One may have to raid the SVN and configure them externally...
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
H

hdante

scipy is pretty powerful, but has awful documentation and it's code
is somewhat disorganized/hacked. Maybe, you could try:

import scipy
import scipy.sandbox
import scipy.sandbox.xplt

pylab is in matplotlib. Install matplotlib, then, for example:

from matplotlib import pylab
pylab.plot([1, 2, 3])
pylab.show()
 
C

Caren Balea

scipy is pretty powerful, but has awful documentation and it's code
is somewhat disorganized/hacked. Maybe, you could try:

import scipy
import scipy.sandbox
import scipy.sandbox.xplt

Okay, thanks. I've tried but without success :(
Here is what is displayed:

Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import scipy.sandbox.xplt
ImportError: No module named xplt
 
R

Robert Kern

Caren said:
Okay, thanks. I've tried but without success :(
Here is what is displayed:


Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import scipy.sandbox.xplt
ImportError: No module named xplt

None of the packages in the sandbox are built by default since they are
experimental and may not even build at any given point in time.

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.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
H

hdante

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 ? :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,433
Messages
2,571,683
Members
48,796
Latest member
Greg L.

Latest Threads

Top