473,594 Members | 2,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

matplotlib and numpy installation

Hi,

I wanted to install python, numpy and matplotlib on Linux Ubuntu.
I installed python with the following commands
../configure --enable-unicode=ucs4
make
make install
and then I installed numpy running
python setup.py install
Finally I came to matplotlib, that for the installation requires the
commands
python setup.py build
python setup.py install
but when I run the first (python setup.py build) I got the following
output that I copied partially below. What am I doing wrong? Can anyone
help?
I had previously another version of python located in usr/bin while the
current is in usr/local/bin. I guess I could remove the previous by the
deleting the relative folder and now if I run the command 'which
python' it actually says 'usr/local/bin/python' so I hope I done it
correctly. If not, how can I uninstall any previous version of python?
Do you think that somehow the error I get is caused by an unclean
removal of that previous version?

Thanks and regards
Francesco

Here follows the output:
-----------------------------------

GTK requires pygtk
TKAgg requires TkInter
GTKAgg requires pygtk
running build
running build_py
running build_ext
building 'matplotlib.bac kends._ns_backe nd_agg' extension
gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prot\
otypes -fPIC'
compile options:
'-I/usr/local/lib/python2.4/site-packages/numpy/core/include -\
I/usr/include -I. -Isrc -Iswig -Iagg23/include -I. -I/usr/include -I.
-I/usr/lo\
cal/lib/python2.4/site-packages/numpy/core/include/freetype2
-I/usr/include/fre\
etype2 -I./freetype2 -Isrc/freetype2 -Iswig/freetype2
-Iagg23/include/freetype2\
-I./freetype2 -I/usr/include/freetype2 -I./freetype2
-I/usr/local/include/pyth\
on2.4 -c'
extra options: '-DSCIPY=1'
gcc: src/_image.cpp
src/_image.cpp:5:17 : png.h: No such file or directory
In file included from /usr/local/include/python2.4/Python.h:8,
from src/_image.cpp:7:
/usr/local/include/python2.4/pyconfig.h:835: 1: warning:
"_POSIX_C_SOURC E" redef\
ined
In file included from
/usr/include/c++/3.3/i486-linux/bits/os_defines.h:39 ,
from
/usr/include/c++/3.3/i486-linux/bits/c++config.h:35,
from /usr/include/c++/3.3/iostream:44,
from src/_image.cpp:1:
/usr/include/features.h:131: 1: warning: this is the location of the
previous de\
finition
src/_image.cpp: In member function `Py::Object Image::write_pn g(const
Py::Tuple&)':
src/_image.cpp:626: error: `png_structp' undeclared (first use this
function)
src/_image.cpp:626: error: (Each undeclared identifier is reported only
once
for each function it appears in.)
src/_image.cpp:626: error: parse error before `;' token
src/_image.cpp:627: error: `png_infop' undeclared (first use this
function)
src/_image.cpp:628: error: aggregate `png_color_8_st ruct sig_bit' has
incomplete type and cannot be defined
src/_image.cpp:629: error: `png_uint_32' undeclared (first use this
function)
src/_image.cpp:629: error: parse error before `=' token
src/_image.cpp:632: error: `png_bytep' undeclared (first use this
function)
src/_image.cpp:632: error: `row_pointers' undeclared (first use this
function)
src/_image.cpp:632: error: parse error before `[' token
src/_image.cpp:634: error: `row' undeclared (first use this function)
src/_image.cpp:645: error: `png_ptr' undeclared (first use this
function)
src/_image.cpp:645: error: `PNG_LIBPNG_VER _STRING' undeclared (first
use this
function)
src/_image.cpp:645: error: `png_create_wri te_struct' undeclared (first
use this\

function)
src/_image.cpp:653: error: `info_ptr' undeclared (first use this
function)
src/_image.cpp:653: error: `png_create_inf o_struct' undeclared (first
use this
function)
src/_image.cpp:657: error: `png_destroy_wr ite_struct' undeclared (first
use
this function)
src/_image.cpp:662: error: `setjmp' undeclared (first use this
function)
src/_image.cpp:670: error: `png_init_io' undeclared (first use this
function)
src/_image.cpp:673: error: `PNG_COLOR_TYPE _RGB_ALPHA' undeclared (first
use
this function)
src/_image.cpp:673: error: `PNG_INTERLACE_ NONE' undeclared (first use
this
function)
src/_image.cpp:674: error: `PNG_COMPRESSIO N_TYPE_BASE' undeclared
(first use
this function)
....

May 27 '06 #1
1 3158
cesco wrote:
Hi,

I wanted to install python, numpy and matplotlib on Linux Ubuntu.
I installed python with the following commands
./configure --enable-unicode=ucs4
[snip]
running build_ext
building 'matplotlib.bac kends._ns_backe nd_agg' extension
gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prot\
otypes -fPIC'
compile options:
'-I/usr/local/lib/python2.4/site-packages/numpy/core/include -\
I/usr/include -I. -Isrc -Iswig -Iagg23/include -I. -I/usr/include -I.
-I/usr/lo\
cal/lib/python2.4/site-packages/numpy/core/include/freetype2
-I/usr/include/fre\
etype2 -I./freetype2 -Isrc/freetype2 -Iswig/freetype2
-Iagg23/include/freetype2\
-I./freetype2 -I/usr/include/freetype2 -I./freetype2
-I/usr/local/include/pyth\
on2.4 -c'
extra options: '-DSCIPY=1'
gcc: src/_image.cpp
src/_image.cpp:5:17 : png.h: No such file or directory


This is the source of the remaining errors....

On my system the "png.h" file comes from a libpng3-devel rpm

Perhaps you need to use apt-get to obtain the development package for png.

-Travis

May 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1568
by: sturlamolden | last post by:
Recently, I have been trying to test Python as an alternative to Matlab. I have problems getting matplotlib to work on Windows (ActivePython 2.4.2). After installing the precompiled binary packages for NumPy 0.9.5 and Matplotlib 0.87.1, I get this error message: >>> import pylab as p Traceback (most recent call last): File "<pyshell#4>", line 1, in ? import pylab as p File "C:\Python24\Lib\site-packages\pylab.py", line 1, in ?
1
4780
by: Martin Manns | last post by:
Hi, When I use matplotlib for a scatter plot with both dots and connecting lines, the exported eps file is huge, if the distances between many points are small. I think of this as a bug, since no preview tiff is included in the generated eps and a variety of text processing applications (including OpenOffice) crash when I try to import the eps. Ghostscript takes forever, too. Is there anything that I can do in order to export reasonable...
0
2585
by: spross | last post by:
hi all i have to use matplotlib on mac os x. on the official site of matplotlib, i found a link to precompiled python packages for mac os x: http://pythonmac.org/packages/py24-fat/index.html so first, i installed python 2.4. that works great! if i type 'python' in the terminal, it loads python 2.4. after that, i loaded and installed the matplotlib package from this
2
5904
by: Simon Forman | last post by:
Hello, I just installed Matplotlib (and NumPy) on a windows XP machine, and I'm getting the following traceback when I try to use the TkAgg backend. Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) on win32 Type "help", "copyright", "credits" or "license" for more information. Traceback (most recent call last):
4
9665
by: John Henry | last post by:
Has anybody been able to create an exe of their python applications involving matplotlib using pyinstall (ver 1.3)? I am getting a: RuntimeError: Could not find the matplotlib data files when I attempt to run the exe created. In searching the web, it appears this is an issue when others tried to use py2exe as well. Unfortunately, the few hits I saw doesn't include enough details to inspire me as to what I should be doing in my
0
4322
by: PamMish1982 | last post by:
Hi all, I have recently started using Python and I am trying to make a GUI out of Tkinter. I am using matplotlib for the graphic purposes. I have to make a exe file from this code. I use py2exe for this purpose but every time I try to make this exe using a setup file I get these errors. Final.py is my python code. Traceback (most recent call last): File "Final.py", line 5, in <module> File "pylab.pyc", line 1, in <module> File...
0
1215
by: Anish Chapagain | last post by:
Hi!! I need to run matplotlib for one project with pylab and scipy module, i'm using cygwin so as to link system call operation with few GUI support, but am unable to install numpy and scipy without these matplotlib is also not installed Please help me for proper installation of these module in cygwin for python, i followed scipy.org installation guidelines but having done so, am not able to proper installation.
3
8173
by: chapagainanish | last post by:
Hi!! I'm having installation problem for installing numpy and scipy in Cygwin for Python, and am obstruct in madway for project, i followed scipy.org guidelines but there's few error thrown as failed..with exit status 1 please if someone has installed these module help me thank's and regard's Anish
2
3101
by: Magdoll | last post by:
Has anyone run into the same problem I have? I used to run matplotlib with Python2.5 and everything worked fine. Now I use Python2.6, and everything falls apart. I installed numpy, libpng, and freetype as required by matplotlib, and the installation all went well. But when I try to plot even the simplest stuff, ex: plot()
0
7946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7876
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8251
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8003
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5408
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3897
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1210
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.