SORU
3 EKİM 2011, PAZARTESİ


Nasıl Python kütüphane kurmak 'gevent' Mac OS X Lion üzerinde alabilirim

gevent Sürüm 0.13.6 (PyPİ güncel sürüm) 4* *OS X Lion değil, Python 2.7 (ve muhtemelen Diğerleri.) Python Kütüphanesi Snow Leopard üzerinde çalışıyor.

Nasıl bu kütüphane yüklü alabilir miyim?

Bonus eğer yapılabilirse, o otomatik kurar, güzel oyun olacak, çünkü elle ya da özel bir işlemi yerine pip install kullanarak puan.

Burada pip install benim çıkış:

pip install gevent
Downloading/unpacking gevent
  Running setup.py egg_info for package gevent

Requirement already satisfied (use --upgrade to upgrade): greenlet in ./tl_env/lib/python2.7/site-packages (from gevent)
Installing collected packages: gevent
  Running setup.py install for gevent
    building 'gevent.core' extension
    gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c gevent/core.c -o build/temp.macosx-10.6-intel-2.7/gevent/core.o
    In file included from gevent/core.c:225:
    gevent/libevent.h:9:19: error: event.h: No such file or directory
    gevent/libevent.h:38:20: error: evhttp.h: No such file or directory
    gevent/libevent.h:39:19: error: evdns.h: No such file or directory
    gevent/core.c:361: error: field ‘ev’ has incomplete type
    gevent/core.c:741: warning: parameter names (without types) in function declaration
    gevent/core.c: In function ‘__pyx_f_6gevent_4core___event_handler’:
    gevent/core.c:1619: error: ‘EV_READ’ undeclared (first use in this function)
    gevent/core.c:1619: error: (Each undeclared identifier is reported only once
    gevent/core.c:15376: warning: assignment makes pointer from integer without a cast
   [... about 1000 more lines of compiler errors...]
    gevent/core.c:15385: error: dereferencing pointer to incomplete type
    gevent/core.c: In function ‘__pyx_pf_6gevent_4core_4http___init__’:
    gevent/core.c:15559: warning: assignment makes pointer from integer without a cast
    gevent/core.c: At top level:
    gevent/core.c:21272: error: expected ‘)’ before ‘val’
    lipo: can't figure out the architecture type of: /var/folders/s5/t94kn0p10hdgxzx9_9sprpg40000gq/T//cczk54q7.out
    error: command 'gcc-4.2' failed with exit status 1
    Complete output from command /Users/jacob/code/toplevel/tl_env/bin/python -c "import setuptools;__file__='/Users/jacob/code/toplevel/tl_env/build/gevent/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/s5/t94kn0p10hdgxzx9_9sprpg40000gq/T/pip-s2hPd3-record/install-record.txt --install-headers /Users/jacob/code/toplevel/tl_env/bin/../include/site/python2.7:
    running install

running build

running build_py

running build_ext

building 'gevent.core' extension

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c gevent/core.c -o build/temp.macosx-10.6-intel-2.7/gevent/core.o

CEVAP
3 EKİM 2011, PAZARTESİ


Yazılan tüm şey yok! Bu çok fazla! Zamanın 'ında, ilk hata yeterli

gevent/libevent.h:9:19: error: event.h: No such file or directory

Bu event.h Başlığı veren kütüphane yüklü değil demektir. Kütüphane libevent (website) denir.

Genel olarak, derleme hataları bu inşa komut bir kusur gibi. Yapı komut libevent yüklü değilse, bir hata mesajı vermeli ve bunu yapmak bir hata.

MacPorts gelen libevent ve sonra el ile almak için pıp çalışırken event.h libevent nerede CFLAGS ortam değişkeni ile derleyici söyle.

sudo port install libevent
CFLAGS="-I /opt/local/include -L /opt/local/lib" pip install gevent

Ayrıca libevent homebrew yüklemek için kullanabilirsiniz : brew install libevent
(David Wolever yorum)

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • How To Cook That

    How To Cook

    16 NİSAN 2011
  • Press Start

    Press Start

    4 HAZİRAN 2006
  • WhtButterflyLiz

    WhtButterfly

    14 NİSAN 2008