boost:python安装时出错:(

lioujian47 2010-03-18 05:41:40
按照这里所说:
http://www.boost.org/doc/libs/1_42_0/libs/python/doc/building.html
》》》
C:\boost_1_34_0\…\quickstart> bjam toolset=msvc --verbose-test test
我增加了一个参数--with-python
结果如下:
C:\Program Files\boost\boost_1_42\libs\python\example\quickstart>bjam --with-pyt
hon toolset=msvc --verbose-test test
...patience...
...patience...
...found 1554 targets...
...updating 22 targets...
common.mkdir bin
common.mkdir bin\test_ext.test
common.mkdir bin\test_ext.test\msvc-7.1
common.mkdir bin\test_ext.test\msvc-7.1\debug
common.mkdir bin\test_ext.test\msvc-7.1\debug\threading-multi
common.mkdir bin\msvc-7.1
common.mkdir bin\msvc-7.1\debug
common.mkdir bin\msvc-7.1\debug\threading-multi
compile-c-c++ bin\msvc-7.1\debug\threading-multi\extending.obj
extending.cpp
msvc.link.dll bin\msvc-7.1\debug\threading-multi\extending.pyd
正在创建库 bin\msvc-7.1\debug\threading-multi\extending.lib 和对象 bin\msvc-7
.1\debug\threading-multi\extending.exp
msvc.manifest.dll bin\msvc-7.1\debug\threading-multi\extending.pyd
capture-output bin\test_ext.test\msvc-7.1\debug\threading-multi\test_ext
已复制 1 个文件。
====== BEGIN OUTPUT ======
Trying:
from extending import *
Expecting nothing
ok
Trying:
hi = hello('California')
Expecting nothing
ok
Trying:
hi.greet()
Expecting:
'Hello from California'
ok
Trying:
invite(hi)
Expecting:
'Hello from California! Please come soon!'
ok
Trying:
hi.invite()
Expecting:
'Hello from California! Please come soon!'
ok
Trying:
class wordy(hello):
def greet(self):
return hello.greet(self) + ', where the weather is fine'
Expecting nothing
ok
Trying:
hi2 = wordy('Florida')
Expecting nothing
ok
Trying:
hi2.greet()
Expecting:
'Hello from Florida, where the weather is fine'
ok
Trying:
invite(hi2)
Expecting:
'Hello from Florida! Please come soon!'
ok
1 items had no tests:
test_extending.run
1 items passed all tests:
9 tests in test_extending
9 tests in 2 items.
9 passed and 0 failed.
Test passed.
#############到这里似乎正确无误了,接着就报错了:(######################
EXIT STATUS: 0
====== END OUTPUT ======
**passed** bin\test_ext.test\msvc-7.1\debug\threading-multi\test_ext.test
common.mkdir bin\test_embed.test
common.mkdir bin\test_embed.test\msvc-7.1
common.mkdir bin\test_embed.test\msvc-7.1\debug
common.mkdir bin\test_embed.test\msvc-7.1\debug\threading-multi
msvc.link bin\test_embed.test\msvc-7.1\debug\threading-multi\test_embed.exe
LINK : warning LNK4001: 未指定对象文件;已使用库
LINK : warning LNK4068: 未指定 /MACHINE;默认设置为 X86
LINK : error LNK2001: 无法解析的外部符号 _mainCRTStartup
bin\test_embed.test\msvc-7.1\debug\threading-multi\test_embed.exe : fatal error
LNK1120: 1 个无法解析的外部命令

call "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars3
2.bat" >nul
link /NOLOGO /INCREMENTAL:NO /DEBUG /subsystem:console /out:"bin\test_embed.test
\msvc-7.1\debug\threading-multi\test_embed.exe" /LIBPATH:"C:\Python25\libs" @"b
in\test_embed.test\msvc-7.1\debug\threading-multi\test_embed.exe.rsp"
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%

...failed msvc.link bin\test_embed.test\msvc-7.1\debug\threading-multi\test_embe
d.exe bin\test_embed.test\msvc-7.1\debug\threading-multi\test_embed.pdb...
...removing bin\test_embed.test\msvc-7.1\debug\threading-multi\test_embed.pdb
...skipped <pbin\test_embed.test\msvc-7.1\debug\threading-multi>test_embed.run f
or lack of <pbin\test_embed.test\msvc-7.1\debug\threading-multi>test_embed.exe..
.
...failed updating 2 targets...
...skipped 2 targets...
...updated 18 targets...


然后我到C:\Program Files\boost\boost_1_42\libs\python\example\quickstart下运行test_extending.py报错如下:
Trying:
from extending import *
Expecting nothing
**********************************************************************
File "C:\Program Files\boost\boost_1_42\libs\python\example\quickstart\test_extending.py", line 6, in test_extending
Failed example:
from extending import *
Exception raised:
Traceback (most recent call last):
File "C:\Python25\lib\doctest.py", line 1228, in __run
compileflags, 1) in test.globs
File "<doctest test_extending[0]>", line 1, in <module>
from extending import *
ImportError: DLL load failed: 找不到指定的模块。
Trying:
hi = hello('California')
Expecting nothing
**********************************************************************
File "C:\Program Files\boost\boost_1_42\libs\python\example\quickstart\test_extending.py", line 7, in test_extending
Failed example:
hi = hello('California')
Exception raised:
Traceback (most recent call last):
File "C:\Python25\lib\doctest.py", line 1228, in __run
compileflags, 1) in test.globs
File "<doctest test_extending[1]>", line 1, in <module>
hi = hello('California')
NameError: name 'hello' is not defined
Trying:
hi.greet()
Expecting:
'Hello from California'
**********************************************************************
File "C:\Program Files\boost\boost_1_42\libs\python\example\quickstart\test_extending.py", line 8, in test_extending
Failed example:
hi.greet()
Exception raised:
Traceback (most recent call last):
File "C:\Python25\lib\doctest.py", line 1228, in __run
compileflags, 1) in test.globs
File "<doctest test_extending[2]>", line 1, in <module>
hi.greet()
NameError: name 'hi' is not defined
Trying:
invite(hi)
Expecting:
'Hello from California! Please come soon!'
**********************************************************************
File "C:\Program Files\boost\boost_1_42\libs\python\example\quickstart\test_extending.py", line 10, in test_extending
Failed example:
invite(hi)
Exception raised:
Traceback (most recent call last):
File "C:\Python25\lib\doctest.py", line 1228, in __run
compileflags, 1) in test.globs
File "<doctest test_extending[3]>", line 1, in <module>
invite(hi)
NameError: name 'invite' is not defined
Trying:
hi.invite()
Expecting:
'Hello from California! Please come soon!'
**********************************************************************
File "C:\Program Files\boost\boost_1_42\libs\python\example\quickstart\test_extending.py", line 12, in test_extending
Failed example:
hi.invite()
Exception raised:
Traceback (most recent call last):
File "C:\Python25\lib\doctest.py", line 1228, in __run
compileflags, 1) in test.globs
File "<doctest test_extending[4]>", line 1, in <module>
hi.invite()
NameError: name 'hi' is not defined
Trying:
class wordy(hello):
def greet(self):
return hello.greet(self) + ', where the weather is fine'
Expecting nothing
**********************************************************************
File "C:\Program Files\boost\boost_1_42\libs\python\example\quickstart\test_extending.py", line 15, in test_extending
Failed example:
class wordy(hello):
def greet(self):
return hello.greet(self) + ', where the weather is fine'
Exception raised:
Traceback (most recent call last):
File "C:\Python25\lib\doctest.py", line 1228, in __run
compileflags, 1) in test.globs
File "<doctest test_extending[5]>", line 1, in <module>
class wordy(hello):
NameError: name 'hello' is not defined
Trying:
hi2 = wordy('Florida')
Expecting nothing
**********************************************************************
File "C:\Program Files\boost\boost_1_42\libs\python\example\quickstart\test_extending.py", line 19, in test_extending
Failed example:
hi2 = wordy('Florida')
Exception raised:
Traceback (most recent call last):
File "C:\Python25\lib\doctest.py", line 1228, in __run
compileflags, 1) in test.globs
File "<doctest test_extending[6]>", line 1, in <module>
hi2 = wordy('Florida')
NameError: name 'wordy' is not defined
Trying:
hi2.greet()
Expecting:
'Hello from Florida, where the weather is fine'
**********************************************************************
File "C:\Program Files\boost\boost_1_42\libs\python\example\quickstart\test_extending.py", line 20, in test_extending
Failed example:
hi2.greet()
Exception raised:
Traceback (most recent call last):
File "C:\Python25\lib\doctest.py", line 1228, in __run
compileflags, 1) in test.globs
File "<doctest test_extending[7]>", line 1, in <module>
hi2.greet()
NameError: name 'hi2' is not defined
Trying:
invite(hi2)
Expecting:
'Hello from Florida! Please come soon!'
**********************************************************************
File "C:\Program Files\boost\boost_1_42\libs\python\example\quickstart\test_extending.py", line 22, in test_extending
Failed example:
invite(hi2)
Exception raised:
Traceback (most recent call last):
File "C:\Python25\lib\doctest.py", line 1228, in __run
compileflags, 1) in test.globs
File "<doctest test_extending[8]>", line 1, in <module>
invite(hi2)
NameError: name 'invite' is not defined
1 items had no tests:
test_extending.run
**********************************************************************
1 items had failures:
9 of 9 in test_extending
9 tests in 2 items.
0 passed and 9 failed.
***Test Failed*** 9 failures.

曾尝试把生成的extending.pyd拷贝到C:\Python25\DLLs下,然后import extending报错:
>>> import extending

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import extending
ImportError: DLL load failed: 找不到指定的模块。


哪儿不对呢?请在牛A和牛C之间徘徊的人出来:)
...全文
292 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
angel_su 2010-03-19
  • 打赏
  • 举报
回复
第一个ext的好像成了吧,执行依赖vc生成那个boost_python-vc??-??-??.dll,记得要摆在一起。
embedding那个错了就不清楚了,vc71没用过,用过mingw和vc90能成...
Notepad2 是一个外观类似系统记事本的文本编辑工具,但比记事本有了很大的增强。 特点: --自定义语法高亮, 支持 HTML, XML, CSS, JavaScript, VBScript, ASP, PHP, CSS, Perl/CGI, C/C++, C#, Java, VB, Pascal, Assembler, SQL, Python, NSIS, INI, REG, INF, BAT, DIFF, Ruby 等众多文件 --支持 ANSI、Unicode、UTF-8 等编码互换 --直接查看 NFO 文件 --可以格式化 C/C++/Java 源代码 --可以把语法高亮方案导出为 HTML、UBB 代码 --内置 BAT/C/C++/NSIS 等语法支持 --内置 NSIS 脚本编译功能(支持 Unicode 版 NSIS) --可以使用代码页转换来转换诸如 BIG5 码等 ANSI 编码 --可以设置无限个书签 (9种图标可换) 轻松定位 --空格, 制表符彩色显示, 并可互相转换 --可以对任意的文本块进行操作, ALT 键+鼠标 --对括号 {} [] ()可以高亮配对显示, 方便查看(仅对英文符号有效) --支持正则表达式搜索和替换 (Boost) --可以使用半透明模式 --快速放大、缩小页面, 不用再设定字体大小 --可以指定 ESC 键最小化 Notepad2 到系统托盘或者关闭 Notepad2 操作系统:Windows Me/2k/xp (32)/2003 (32)/vista (32)/2008 (32) v1.1.1.2 在 NotePad2 Mod v1.1.1.0 官方版本(蓝色网际/bluenet)的基础之上做了一些小小的修改,使它更完善一些。 更新(1110->1112): 1、修正 "for %%" 字串(在“批处理文件”语法高亮方案下)可能导致程序出错的 bug; 2、添加状态栏的编码部分双击切换编码格式,右击弹出编码格式选择菜单; 3、添加默认编码格式在常规设置页面中; 4、添加一个 unicode / ansi NSIS 开关在常规设置页面中,支持 Unicode 版的 NSIS; 5、添加清除历史记录的功能(菜单); 6、添加保存“文件/查找/替换”历史记录的开关在编辑器设置页面中; 7、“查找/替换/收集对话框”滚动鼠标滚轮按钮激活“查找”; 8、按下“Ctrl+F”、“Ctrl+H”,重新激活查找替换窗口,并切换到相应的标签页; 9、修正添加的打开方式没有增加到“用外部程序打开”下子菜单的 bug; 10、改善“配置外部程序”的功能; 11、修正运行新窗口弹出文件未找到的错误提示; 12、其它一些细节修改; 13、修正“复制为 UBB 代码”后粘贴末尾缺少一个“]”符号的 bug; 14、“打开收藏夹”中支持的文件类型添加“快捷方式(lnk)”; 15、保存文件的对话框中增加“所有文件 (*.*)”,可以保存为其它的扩展名; 16、改用 VC 2005 编译,修正部分系统中可能导致系统蓝屏或者重启的BUG; 17、升级版本号为 1112; 18、其它细节修改。 其它说明: 主目录下的是简/繁/英三语言一体的版本,自动根据系统选择语言,子目录下分别对应各语系的版本。 替换系统记事本可用压缩包中的“替换系统记事本.bat”,还原系统记事本可用压缩包中的“还原系统记事本.bat”。 已知问题:Unicode 的符号会无法显示。 致谢: 感谢 fashno、Jeffio、X-Star、老陈 等以及汉化论坛与 NSIS 新手群中很多朋友的测试与 BUG 反馈!
作者介绍 Toby,持牌照金融公司担任模型验证专家,国内最大医药数据中心数据挖掘部门负责人!和重庆儿科医院,中科院教授,赛柏蓝保持慢病数据挖掘项目合作!管理过欧美日中印巴西等国外药典数据库,马丁代尔数据库,FDA溶解度数据库,临床试验数据库,WHO药物预警等数据库。课程概述 此课程讲述如何运用python的sklearn快速建立机器学习模型。课程结合美国威斯康辛乳腺癌细胞临床数据,实操演练,建立癌细胞预测分类器。课程讲述十大经典机器学习算法:逻辑回归,支持向量,KNN,神经网络,随机森林,xgboost,lightGBM,catboost。这些算法模型可以应用于各个领域数据。本视频系列通俗易懂,课程针对学生和科研机构,python爱好者。本视频教程系列有完整python代码,观众看后可以下载实际操作。了解癌症肿瘤基本常识,建立健康生活方式,预防癌症,减轻癌症治疗成本。课程背景 警钟长鸣!癌症离我们远吗?《我不是药神》催人泪下,笔者在此揭露真相,癌症不是小概率疾病,癌症就在身边。癌症早期发现和控制可极大延长寿命和减少治疗费用。笔者下载美国威斯康辛临床数据,运用python sklearn建立乳腺癌分类器模型,可预测正常细胞和癌细胞。我国医院重视治疗,但忽略疾病预防教育。通过我多年机器学习数据挖掘,我发现疾病可防可控,通过自身努力,我们可以提前发现疾病早期症状或扼杀疾病于摇篮。希望此课程让广大医疗科研工作者认识疾病预防教育重要性。  

37,720

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧