- 論壇徽章:
- 0
|
dpkt下載地址:http://code.google.com/p/dpkt/downloads/list 安裝就行了
pcap下載地址:http://download.csdn.net/source/1852750 上CSDN下載頻道下載的!好像沒(méi)用再找找看:::http://code.google.com/p/pypcap/downloads/list 好像還是安裝之后使用不了呀。郁悶
再找找看吧!
我直接從SF上面下載了代碼下來(lái)然后進(jìn)行編譯python setup.py install結(jié)果報(bào):
error: Python was built with Visual Studio version 7.1, and extensions need to b
e built with the same version of the compiler, but it isn't installed.
GOOGL了一下找到同樣的一個(gè)問(wèn)題:
(以下文章是:http://hi.baidu.com/heshuai64/blog/item/45031a32375e8bfe1a4cffe1.html)
一直都在Linux下工作,今天想在windows安裝一個(gè)python模塊,發(fā)生如下問(wèn)題:
E:\Download\python\python-cjson-1.0.3>python setup.py install
running install
running build
running build_ext
building 'cjson' extension
error: Python was built with Visual Studio version 7.1, and extensions need to b
e built with the same version of the compiler, but it isn't installed.
google下發(fā)現(xiàn)一個(gè)解決方案:
I found an Alternate Solution by configuring MingW
Task:
RDFLib installation
Problem:
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.
Solution:
How to Configure Mingw:
* Download last release from http://prdownloads.sourceforge.net/mingw (MinGW-5.1.3.exe)
* Run the file to start the installation process
* Keep all values at their defaults and select at least next components:
o MinGW base tools
o g++ compiler
o MinGW Make
* Add the C:\mingw\bin directory to the system PATH
* Create (or edit) a .cfg file for distutils (distutils.cfg) eg: C:\Python25\Lib\distutils\distutils.cfg with this content:
[build]
compiler=mingw32
Then type in your RDFlib directory> python setup.py install
creating C:\Python25\Lib\site-packages\rdflib\store
copying build\lib.win32-2.5\rdflib\store\AbstractSQLStore.py -> C:\Python25\Lib\
site-packages\rdflib\store
copying build\lib.win32-2.5\rdflib\store\AuditableStorage.py -> C:\Python25\Lib\
site-packages\rdflib\store
copying build\lib.win32-2.5\rdflib\store\Concurrent.py -> C:\Python25\Lib\site-p
ackages\rdflib\store
....
....
....
Writing C:\Python25\Lib\site-packages\rdflib-2.3.3-py2.5.egg-info
Thats it Good Luck!
Further Source: http://livingpyxml.python-hosting.com/wiki/AmaraWindowsInstallTips
試試看
E:\Download\python\python-cjson-1.0.3>python setup.py install
running install
running build
running build_ext
building 'cjson' extension
D:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -ID:\Python25\include -ID:\Pytho
n25\PC -c cjson.c -o build\temp.win32-2.5\Release\cjson.o
writing build\temp.win32-2.5\Release\cjson.def
creating build\lib.win32-2.5
D:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.5\Release\cjson.o
build\temp.win32-2.5\Release\cjson.def -LD:\Python25\libs -LD:\Python25\PCBuild
-lpython25 -lmsvcr71 -o build\lib.win32-2.5\cjson.pyd
running install_lib
copying build\lib.win32-2.5\cjson.pyd -> D:\Python25\Lib\site-packages
running install_egg_info
Writing D:\Python25\Lib\site-packages\python_cjson-1.0.3-py2.5.egg-info
成功
我的解決方法:
第一步:http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download 去下載一個(gè)C語(yǔ)文編譯器下來(lái)!
安裝的目錄在:C:\MinGW\bin
第二步:我上http://www.pdflib.com/download/pdflib-family/pdflib-7/ 去下載了一個(gè)pdflib包進(jìn)來(lái)了。先下載下來(lái)看看吧!好像下載錯(cuò)了我昏S。。。
可參考的站:http://alimanfoo.wordpress.com/2008/04/12/installing-rdflib-on-windows-and-making-it-work-with-pydev/
介紹了rdflib的安裝方法。
[build]
compiler=mingw32
這里面寫(xiě)的格式要注意了 不能有空格。我一開(kāi)始有空格結(jié)果就報(bào)錯(cuò)了
正確的寫(xiě)法應(yīng)當(dāng)是
[build]
compiler=mingw32
這樣寫(xiě)才是正確的!
How to Configure Mingw:
* Download last release from http://prdownloads.sourceforge.net/mingw (MinGW-5.1.3.exe)
* Run the file to start the installation process
* Keep all values at their defaults and select at least next components:
o MinGW base tools
o g++ compiler
o MinGW Make
* Add the C:\mingw\bin directory to the system PATH
* Create (or edit) a .cfg file for distutils (distutils.cfg) eg: C:\Python25\Lib\distutils\distutils.cfg with this content:
[build]
compiler=mingw32
Then type in your RDFlib directory> python setup.py install
還沒(méi)搞定。有沒(méi)有N人可以幫我解決一下的呢謝謝了為什么我的pcap 模塊安裝不上?能幫我解決一下嗎?謝謝了
本文來(lái)自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u2/84280/showart_2112270.html |
|