|
List Info
Thread: P4Python, MySQLdb, or Python Extensions
|
|
| P4Python, MySQLdb, or Python Extensions |

|
2007-10-08 15:57:03 |
|
Hello everyone,
Short time lurker, first time poster.
I'm trying to install P4Python and MySQLdb, but am running into a host of issues.
The trouble I've had trying to install these two and the number of similar experiences I've read through googling leads me to believe that Python can be difficult on the Mac.
I will talk about P4Python as it seems to be the easier of the two. I'm trying to compile the given c++ file to build a Python Extension, but the setup.py doesn't work as it should be linking in CoreFoundation, but it is not.
ImportError: Failure linking new module: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/P4Client.so: Symbol not found: ___CFConstantStringClassReference
Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/P4Client.so
Expected in: dynamic lookup I tried to use Xcode to build something that can go where the site-packages go. But I have no idea what to build. It is not a dynamic library, it is not a relocatable object, I get this error when I try to import:
Traceback (most recent call last): File "<stdin>", line 1, in ?
File "p4.py", line 19, in ? import P4Client ImportError: Inappropriate file type for dynamic loading
Has anyone done this? How do I build a Python Extension using Xcode? Or perhaps even better, how do I get
setup.py to work on the Mac?
Thanks for any and all tips! Lyndsey Ferguson
|
| Re: P4Python, MySQLdb, or Python
Extensions |

|
2007-10-09 09:16:38 |
|
.so, if im not mistaken is eather a linux shared library or not a mac
shared library (someone correct me if im wrong) try making sure the
python version you chose is the one for mac. the best supported python
for mac is
macpython
(distributes in a mac installer package) from the python website but
another more linux like one would be the darwinports one or the fink
one. Try looking
here http://wiki.python.org/moin/MacPython/PythonDistributionsForMac
On 10/8/07, Lyndsey Ferguson < lyndsey.ferguson gmail.com">lyndsey.ferguson gmail.com> wrote:
Hello everyone,
Short time lurker, first time poster.
I'm trying to install P4Python and MySQLdb, but am running into a host of issues.
The trouble I've had trying to install these two and the number of similar experiences I've read through googling leads me to believe that Python can be difficult on the Mac.
I will talk about P4Python as it seems to be the easier of the two. I'm trying to compile the given c++ file to build a Python Extension, but the setup.py doesn't work as it should be linking in CoreFoundation, but it is not.
ImportError: Failure linking new module: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/P4Client.so: Symbol not found: ___CFConstantStringClassReference
Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/P4Client.so
Expected in: dynamic lookup I tried to use Xcode to build something that can go where the site-packages go. But I have no idea what to build. It is not a dynamic library, it is not a relocatable object, I get this error when I try to import:
Traceback (most recent call last): File "<stdin>", line 1, in ?
File "p4.py", line 19, in ? import P4Client ImportError: Inappropriate file type for dynamic loading
Has anyone done this? How do I build a Python Extension using Xcode? Or perhaps even better, how do I get
setup.py to work on the Mac?
Thanks for any and all tips! Lyndsey Ferguson
_______________________________________________ Pythonmac-SIG maillist - python.org">Pythonmac-SIG python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
--
"lalalalala! it's not broken because I can use it"
http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703
|
| Re: P4Python, MySQLdb, or Python
Extensions |

|
2007-10-09 10:59:41 |
|
On 10/9/07, Nehemiah Dacres < vivacarlie gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">vivacarlie gmail.com
> wrote:
.so, if im not mistaken is eather a linux shared library or not a mac
shared library (someone correct me if im wrong) try making sure the
python version you chose is the one for mac. the best supported python
for mac is
macpython
(distributes in a mac installer package) from the python website but
another more linux like one would be the darwinports one or the fink
one. Try looking
here http://wiki.python.org/moin/MacPython/PythonDistributionsForMac
Thank you for the reply. I have removed older versions of Python and using your link, installed Python 2.5 for the Macintosh.
After which I tried to build and install with the same problem. But I have solved it and will post it to the author and this list (in case someone follows in my footsteps).
In the setup.py for the Macintosh case, I had to add the "extra_link_args=["-framework", "Carbon] to the setup call. This works and I was able to run it in python.
Regards, Lyndsey Ferguson
-- Lyndsey Ferguson
|
| Re: P4Python, MySQLdb, or Python
Extensions |
  United States |
2007-10-09 14:50:44 |
Lyndsey Ferguson wrote:
> In the setup.py for the Macintosh case, I had to add
the
> "extra_link_args=["-framework",
"Carbon] to the setup call. This works
> and I was able to run it in python.
Shouldn't distutils do this for you? Anyone know?
-CHB
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker noaa.gov
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
|
|
[1-4]
|
|