python4delphi import lxml pandas 出错的小结
2015-08-29 13:08
309 查看
环境:
1.win10 64位
2.delphi xe8
3.python2.7
4.python4delphi (svn 2015-03-21 发布的83版本号)
5.lxml 3.4.4(通过pip 安装的)
6.pandas 0.16.2
错误现象:1.找不到指定的DLL
![](https://images2015.cnblogs.com/blog/793998/201508/793998-20150830115035234-87265124.jpg)
2.初始化dll失败
![](https://images2015.cnblogs.com/blog/793998/201508/793998-20150830115035765-18772475.jpg)
3.ImportError: C extension: DLL load failed: 找不到指定的模块。
![](https://images0.cnblogs.com/blog/793998/201508/291307310155792.png)
解决: 1、lxml的问题用Anaconda-2.3.0-Windows-x86 里面的lxml替换掉之后就解决了; 估计是mvcrt90.dll的版本问题,两个msvcr90.dll会造成初始化有问题
![](https://images2015.cnblogs.com/blog/793998/201508/793998-20150830115036250-1158172485.jpg)
![](https://images2015.cnblogs.com/blog/793998/201508/793998-20150830115036890-1110852952.jpg)
2、pandas 的ImportError:C extension问题:
Per-requirement Overrides¶ Since version 7.0 pip supports controlling the command line options given to
The above translates roughly into running FooProject's
Note that the only way of giving more than one option to
经测试上面的方法没有用。
将生产的程序project4.exe复制到D:\Anaconda文件夹下就没有报错了,不知道为什么
python4delphi 调用Anaconda的python27.dll且路径里面只要包含Anaconda的Lib和DLLs就可以正常使用了,
但是python27.dll换成原来装的python的就不行,一直报ImportError:C extension问题
另外一个很重要的注意事项是版本问题,Python扩展包和Python的版本严格相关,不同版本的Python,其扩展包的版本也不同。
最后一个注意事项是32位和64位不要搞混了,所有扩展包都分32位和64位两种版本。
。
1.win10 64位
2.delphi xe8
3.python2.7
4.python4delphi (svn 2015-03-21 发布的83版本号)
5.lxml 3.4.4(通过pip 安装的)
6.pandas 0.16.2
错误现象:1.找不到指定的DLL
![](https://images2015.cnblogs.com/blog/793998/201508/793998-20150830115035234-87265124.jpg)
2.初始化dll失败
![](https://images2015.cnblogs.com/blog/793998/201508/793998-20150830115035765-18772475.jpg)
3.ImportError: C extension: DLL load failed: 找不到指定的模块。
![](https://images0.cnblogs.com/blog/793998/201508/291307310155792.png)
解决: 1、lxml的问题用Anaconda-2.3.0-Windows-x86 里面的lxml替换掉之后就解决了; 估计是mvcrt90.dll的版本问题,两个msvcr90.dll会造成初始化有问题
![](https://images2015.cnblogs.com/blog/793998/201508/793998-20150830115036250-1158172485.jpg)
![](https://images2015.cnblogs.com/blog/793998/201508/793998-20150830115036890-1110852952.jpg)
2、pandas 的ImportError:C extension问题:
piphas a
--global-optionflag You can use it to pass additional flags to
build_ext. For instance, to add a
-Iflag: pip install --global-option=build_ext --global-option=--inplace --global-option="-Id:\pandas" pandas
Per-requirement Overrides¶ Since version 7.0 pip supports controlling the command line options given to
setup.pyvia requirements files. This disables the use of wheels (cached or otherwise) for that package, as
setup.pydoes not exist for wheels. The
--global-optionand
--install-optionoptions are used to pass options to
setup.py. For example:
FooProject >= 1.2 --global-option="--no-user-cfg" \ --install-option="--prefix='/usr/local'" \ --install-option="--no-compile"
The above translates roughly into running FooProject's
setup.pyscript as:
python setup.py --no-user-cfg install --prefix='/usr/local' --no-compile
Note that the only way of giving more than one option to
setup.pyis through multiple
--global-optionand
--install-optionoptions, as shown in the example above. The value of each option is passed as a single argument to the
setup.pyscript. Therefore, a line such as the following is invalid and would result in an installation error.
# Invalid. Please use '--install-option' twice as shown above. FooProject >= 1.2 --install
经测试上面的方法没有用。
将生产的程序project4.exe复制到D:\Anaconda文件夹下就没有报错了,不知道为什么
python4delphi 调用Anaconda的python27.dll且路径里面只要包含Anaconda的Lib和DLLs就可以正常使用了,
但是python27.dll换成原来装的python的就不行,一直报ImportError:C extension问题
另外一个很重要的注意事项是版本问题,Python扩展包和Python的版本严格相关,不同版本的Python,其扩展包的版本也不同。
最后一个注意事项是32位和64位不要搞混了,所有扩展包都分32位和64位两种版本。
。
相关文章推荐
- Delphi 和 DFM
- win8(x64)下,重新安装delphi 2007时出现“Invalid Serial Number”,如何解决?
- delphi中文件以及线程操作基础
- [备忘]Delphi 7 编译软件申请管理员权限
- Delphi 在多线程中会应用到的读写锁-“多读一写”同步器-TMultiReadExclusiveWriteSynchronizer
- (转载)Delphi TStringList的用法
- Delphi 连接SQLserver
- Delphi 7连接MySql 5.5.15
- python4delphi 设置syspath
- Delphi 指针大全
- Delphi 异常抛出与捕获
- Delphi 窗体程序接受命令行参数
- Delphi XE7中蓝牙 Bluetooth例子的使用
- 一句话改变TWinControl控件的left坐标的前世今生(入口函数是SetBounds,然后调用SetWindowPos起作用,并发消息更新Delphi的left属性值)
- Delphi控件的显示内容与显示边框是两回事
- python4delphi 安装
- 怎样在delphi中实现控件和窗体的拖拽
- Delphi日期时间 UNIX
- Delphi 调用dll中的窗体
- DELPHI XE5安装