Hi, I am new to Python, and I am trying to install the matplotlib but it is
not working.
I would appreciate your help.
I am using Python with the PythonWin environment. I have created a PYTHONPATH on my environment variables to make
sure I point to all the libraries.
I have installed the numpy, scipy and other libraries that seems
to work just fine.
BUT when I try to load the matplotlib, this is what I get:
···
ERROR:
from matplotlib import *
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 97, in
<module>
import distutils.sysconfig
File "C:\Python25\Lib\site-packages\numpy\distutils\__init__.py", line 6,
in <module>
import ccompiler
File "C:\Python25\Lib\site-packages\numpy\distutils\ccompiler.py", line 7,
in <module>
from distutils import ccompiler
ImportError: cannot import name ccompiler
- It's having a problem with ccompiler, but ccompiler.py is on that
directory.
Thanks in advance for your help.
Gus
It looks like you have a problem with your PYTHONPATH. You shouldn't have c:\Python25\Lib\site-packages\numpy\ on your PYTHONPATH. Show me your PYTHONPATH, and I can point out what else is wrong.
···
On 2009-02-10 15:26, Gustavo Blando wrote:
Hi, I am new to Python, and I am trying to install the matplotlib but it is
not working.
I would appreciate your help.
I am using Python with the PythonWin environment.
I have created a PYTHONPATH on my environment variables to make
sure I point to all the libraries.
I have installed the numpy, scipy and other libraries that seems
to work just fine.
BUT when I try to load the matplotlib, this is what I get:
ERROR:
from matplotlib import *
Traceback (most recent call last):
File "<interactive input>", line 1, in<module>
File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 97, in
<module>
import distutils.sysconfig
File "C:\Python25\Lib\site-packages\numpy\distutils\__init__.py", line 6,
in<module>
import ccompiler
File "C:\Python25\Lib\site-packages\numpy\distutils\ccompiler.py", line 7,
in<module>
from distutils import ccompiler
ImportError: cannot import name ccompiler
- It's having a problem with ccompiler, but ccompiler.py is on that
directory.
--
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
Awesome Robert, thanks.
Here is the Python path.
C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages;C:\StatEye\v5_2;C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages
Thanks
Gus
Robert Kern wrote:
···
On 2009-02-10 15:26, Gustavo Blando wrote:
Hi, I am new to Python, and I am trying to install the matplotlib but it is
not working.
I would appreciate your help.
I am using Python with the PythonWin environment.
I have created a PYTHONPATH on my environment variables to make
sure I point to all the libraries.
I have installed the numpy, scipy and other libraries that seems
to work just fine.
BUT when I try to load the matplotlib, this is what I get:
ERROR:
from matplotlib import *
Traceback (most recent call last):
File "<interactive input>", line 1, in<module>
File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 97, in
<module>
import distutils.sysconfig
File "C:\Python25\Lib\site-packages\numpy\distutils\__init__.py", line 6,
in<module>
import ccompiler
File "C:\Python25\Lib\site-packages\numpy\distutils\ccompiler.py", line 7,
in<module>
from distutils import ccompiler
ImportError: cannot import name ccompiler
- It's having a problem with ccompiler, but ccompiler.py is on that
directory.
It looks like you have a problem with your PYTHONPATH. You shouldn't have c:\Python25\Lib\site-packages\numpy\ on your PYTHONPATH. Show me your PYTHONPATH, and I can point out what else is wrong.
Okay, none of that is necessary except for C:\StatEye\v5_2 . site-packages will already be on your sys.path, so putting it on the PYTHONPATH is unnecessary. The package directories like numpy and matplotlib definitely should *not* be on your PYTHONPATH or sys.path. It is the directory that *contains* your packages that needs to be on the sys.path; but as I already noted, site-packages is built in, so you don't need to add it yourself.
···
On 2009-02-10 16:50, Gustavo Blando wrote:
Awesome Robert, thanks.
Here is the Python path.
C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages;C:\StatEye\v5_2;C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages\numpy;C:\Python25\Lib\site-packages\matplotlib;C:\Python25\Lib\site-packages\scipy;C:\Python25\Lib\site-packages\pyreadline;C:\Python25\Lib\site-packages
--
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