Lora Frank
Lora Frank

Reputation: 21

trouble installing pycurl on mac 10.8.5

I really have trouble installing pycurl on the mac of my girlfriend, I managed to do it on my own but I did not remember which command brought the success. Everything I tried on her mac wont't work.

I looked up every answer I could find on how to install pycurl, nothing worked for me :(. I tried macports, didn't work as well. The problem is, I am not that into using the terminal

Here is what I've tried so far:

sudo port install py27-yaml
sudo port install py27-curl
/opt/local/bin/python2.7
import pycurl

but id didn't ' work :(

trying sudo env ARCHFLAGS="-arch x86_64" easy_install setuptools pycurl==7.19.0

brings me this

Last login: Wed Oct  9 23:51:34 on ttys000
Loras-MacBook-Air:~ Lora$ sudo env ARCHFLAGS="-arch x86_64" easy_install setuptools pycurl==7.19.0
Searching for setuptools
Best match: setuptools 0.6c12dev-r88846
setuptools 0.6c12dev-r88846 is already the active version in easy-install.pth
Installing easy_install script to /usr/local/bin
Installing easy_install-2.7 script to /usr/local/bin

Using /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Processing dependencies for setuptools
Finished processing dependencies for setuptools
Searching for pycurl==7.19.0
Reading http://pypi.python.org/simple/pycurl/
Reading http://pycurl.sourceforge.net/
Reading http://pycurl.sourceforge.net/download/
Best match: pycurl 7.19.0
Downloading http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz
Processing pycurl-7.19.0.tar.gz
Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-r7sdRe/pycurl-7.19.0/egg-dist-tmp-DKaHyW
Using curl-config (libcurl 7.32.0)
clang: warning: argument unused during compilation: '-mno-fused-madd'
src/pycurl.c:1168:16: warning: implicit conversion loses integer precision:
      'long' to 'int' [-Wshorten-64-to-32]
            ret = dup(PyInt_AsLong(fileno_result));
                  ~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pycurl.c:1912:31: warning: implicit conversion loses integer precision:
      'long' to 'int' [-Wshorten-64-to-32]
                        val = PyLong_AsLong(PyTuple_GET_ITEM(t, j));
                            ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pycurl.c:2904:22: warning: implicit conversion loses integer precision:
      'long' to '__darwin_suseconds_t' (aka 'int') [-Wshorten-64-to-32]
        tv.tv_usec = (long)(timeout*1000000.0);
                   ~ ^~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
zip_safe flag not set; analyzing archive contents...
Adding pycurl 7.19.0 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/pycurl-7.19.0-py2.7-macosx-10.8-x86_64.egg
Processing dependencies for pycurl==7.19.0
Finished processing dependencies for pycurl==7.19.0
Loras-MacBook-Air:~ Lora$ 

i just cant get i done :(

Upvotes: 2

Views: 1672

Answers (3)

mahmoh
mahmoh

Reputation: 792

The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified. from Kasper Munck

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future easy_install-2.7  pycurl

Upvotes: 2

Cupitor
Cupitor

Reputation: 11657

I would suggest you not to use port, but download and install brew+pip and then install pycurl using pip. These are the steps

1)Homebrew or simply enter "ruby -e "curl -fsSL https://raw.github.com/mxcl/homebrew/go" in terminal"(without the outermost quote)

2)Then install pip by entering in terminal: "brew install pip in shell"

3)And then again in terminal "sudo pip install pycurl"

Upvotes: -1

TobiMarg
TobiMarg

Reputation: 3817

I have no mac, but I think the output is relatively clear:

port: command not found

This probably means no macports is installed and you need to do that first. This seem to be pretty easy if you follow the instructions here. After that you shoul be able to use the port command.

Upvotes: 0

Related Questions