ubuntu16.04 python ipc-bench 編譯

ipc-bench: A UNIX inter-process communication benchmark

Running ipc-bench

You can very easily run ipc-bench on your own machines, and we encourage you to do so and submit the results for inclusion in our open database (see below)!

ipc-bench has only four depencencies:

  1. a 64-bit machine and OS,
  2. a compatible OS (currently: Linux 2.6.30+, OpenBSD, Mac OS X; others may work),
  3. Python 2.5+,
  4. the NUMA headers (libnuma1 and libnuma-dev packages on Debian/Ubuntu).

Once you have made sure that the dependencies are in place, simply clone our git repository and run ipc-bench:

$ git clone http://github.com/ms705/ipc-bench.git
$ cd ipc-bench
$ python run.py


ubuntu16.04 系統下面 編譯ipc-bench,遇到了不少問題. 沒有接觸過python, 現在linux 裏面python 腳本越來越多了, 簡要記錄一下:


1. python run.py 
Traceback (most recent call last):
  File "run.py", line 12, in <module>
    from restkit import Resource, BasicAuth
ImportError: No module named restkit

運行run.py, 報錯.意思好像是缺少 restkit 這個模塊, 用 pip 安裝這個模塊...

2.sudo pip install restkit

/usr/local/bin/python: No module named pip


系統裏面沒有這個命令,google 了一下,通過下面方法安裝上了 pip


sudo apt-get install python-setuptools
sudo easy_install pip
sudo apt-get update
which pip //to check pip install or not

顯示已經存在改命令,重新安裝 restkit 模塊


3. sudo pip install restkit
    http_parser/parser.c:8:22: fatal error: pyconfig.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

又報錯了, 缺了一個包, google...

4.sudo apt-get install libpython2.7-dev

安裝完這個包後,繼續安裝...

5.sudo pip install restkit

終於安裝完成...

6.python run.py 

跑起來了...


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章