473,699 Members | 2,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python.h include not found

When I add #include <Python.h> to a
header file, GCC tells me, No such file or directory.

Am trying to learn how to combine C++ and Python.
Using SuSE 9.0 Linux, 2.4.21-231-default
GCC 3.3.1
Python 2.3.4 (Just built on the box successfully)

My problem is frustratingly simple and I am sure is because I am
ignorant of correct GCC setup and config. I am using the default SuSE
GCC setup unchanged.

I installed Python from source to /usr/local/Python-2.3.4/
The Include directory, and everything else, is there.

I have hunted through the info docs, particularly GCC, but cannot see
where I change the config to fix this... Where did I miss this?

Tried specifying the full path, #include ".../Python.h"
but then lots of related stuff breaks cos its not found...

The compile is a simple/test exercise
and works without the Python.h header line.

Appreciate any suggestions or hints as to what to look for.

Steve Doody.
SD AT ACM DOT ORG


Jul 22 '05 #1
2 13370
Steve Doody wrote:
When I add #include <Python.h> to a
header file, GCC tells me, No such file or directory.


news:comp.lang. python is much more qualified to answer this.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 22 '05 #2
On Mon, 26 Jul 2004 02:03:58 GMT, Steve Doody <sd@acm.org> wrote:
When I add #include <Python.h> to a
header file, GCC tells me, No such file or directory.

Am trying to learn how to combine C++ and Python.
Using SuSE 9.0 Linux, 2.4.21-231-default
GCC 3.3.1
Python 2.3.4 (Just built on the box successfully)

My problem is frustratingly simple and I am sure is because I am
ignorant of correct GCC setup and config. I am using the default SuSE
GCC setup unchanged.

I installed Python from source to /usr/local/Python-2.3.4/
The Include directory, and everything else, is there.

I have hunted through the info docs, particularly GCC, but cannot see
where I change the config to fix this... Where did I miss this?

Tried specifying the full path, #include ".../Python.h"
but then lots of related stuff breaks cos its not found...

The compile is a simple/test exercise
and works without the Python.h header line.

Appreciate any suggestions or hints as to what to look for.


This isn't a C++ question, but rather a question on how to use your
compiler (e.g. ask in a gcc or python group next time). But you just
need to add the include directory to your include path
(-I/usr/local/Python-2.3.4/include or whatever). You probably also
need to add the library directory and the library to the command line
to gcc too (usually done via a make file).

Tom
Jul 22 '05 #3

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

Similar topics

1
2430
by: Benjamin Sher | last post by:
Dear friends: I would appreciate your help in installing SIP with QT support so that I can then install PyQT. My reason is that I would like to install a number of KDE applications that require as a prerequisite SIP and PyQT. As an ordinary user, I recognize my limitations as far as programming. My dilemma is that this stuff is quite difficult and beyond my competence, but I
1
4909
by: Justin Johnson | last post by:
Hello, I'm trying to build Python 2.5.0 on AIX 5.3 using IBM's compiler (VisualAge C++ Professional / C for AIX Compiler, Version 6). I run configure and make, but makes fails with undefined symbols. See the output from configure and make below. svnadm /svn/build/python-2.5.0>env CC=cc CXX=xlC ./configure --prefix=$base_dir \ checking MACHDEP... aix5
0
2449
by: Akira Kitada | last post by:
Hi list, I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb _sqlite3 _tkinter gdbm linuxaudiodev spwd sunaudiodev
0
1947
by: Akira Kitada | last post by:
Hi Marc-Andre, Thanks for the suggestion. I opened a ticket for this issue: http://bugs.python.org/issue4204 Now I understand the state of the multiprocessing module, but it's too bad to see math, mmap and readline modules, that worked fine before, cannot be built anymore.
0
8685
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
8612
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,...
1
8905
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,...
0
7743
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6532
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
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
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.