环境:

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

2.初始化dll失败

3.ImportError: C extension: DLL load failed: 找不到指定的模块。

解决:

1、lxml的问题用Anaconda-2.3.0-Windows-x86 里面的lxml替换掉之后就解决了;

估计是mvcrt90.dll的版本问题,两个msvcr90.dll会造成初始化有问题

2、pandas 的ImportError:C extension问题:

pip has a --global-option flag

You can use it to pass additional flags to build_ext.

For instance, to add a -I flag:

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.py via requirements files. This disables the use of wheels (cached or otherwise) for that package, as setup.py does not exist for wheels.

The --global-option and --install-option options 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.py script 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.py is through multiple --global-option and --install-option options, as shown in the example above. The value of each option is passed as a single argument to the setup.py script. 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位两种版本。

python4delphi import lxml pandas 出错的小结的更多相关文章

  1. import caffe时出错:can not find module skimage.io

    import caffe时出错:can not find module skimage.io  //以下内容在ubuntu16.4上实际验证过.注意大小写的.----20170605 在命令行输入Py ...

  2. 问题解决:import paddle.fluid出错:DLL load failed: 找不到指定的模块

    问题描述: 使用Pycharm编程,导入paddlepaddle库出错.即:import paddle.fluid出错:DLL load failed: 找不到指定的模块 解决方法: 补上缺失的DLL ...

  3. pip 安装 lxml等 出错 解决

    x86-gnu-gcc 出错 安装如下 sudo apt-get install libffi-dev sudo apt-get install libssl-dev sudo apt-get ins ...

  4. Pyinstaller 中 pandas出错问题的解决(详细)

    环境配置 pip install pyinstaller pyinstaller中的参数 -F 表示生成单个可执行文件 -c 显示命令行窗口,一般一开始的时候使用,如果没有错误,那就使用-w命令 -w ...

  5. 关于Eclipse中import javax.servlet.*出错

    今天为了调试一下我写的Servlet,突然间,发现我的站点下所有的Servlet全部都出错了,仔细一看,原来是import javax.servlet.*这里出错了. 然后我就上网查阅了一些资料,才发 ...

  6. Java import javax.servlet 出错

    Error: The import javax.servlet cannot be resolved The import javax.servlet.http.HttpServletRequest ...

  7. import javax.servlet 出错(真的很管用)

    Error: The import javax.servlet cannot be resolved The import javax.servlet.http.HttpServletRequest ...

  8. Python 3中,import win32com.client 出错

    在 import win32com.client 时,出现了界面: Traceback (most recent call last): File "<pyshell#1>&qu ...

  9. Solr 4.3.0 配置Data import handler时出错

    启动solr的时候,居然出现了如下的错误: org.apache.solr.common.SolrException: RequestHandler init failure        at or ...

随机推荐

  1. android之SQLlite操作

    布局文件 创建了四个按键,分别对应增删改查 <?xml version="1.0" encoding="utf-8"?> <LinearLay ...

  2. 第二节Unity3D开发环境安装(windows系统)

        这一节准备安装开发环境. 1. 首先先下载软件包:http://pan.baidu.com/s/1imYVv  4.2版本2.下载完后,解压会看到两个文件(运行第二个安装包) 3.准备安装,这 ...

  3. php中curl的详细解说

    cURL可以使用URL的语法模拟浏览器来传输数据, 因为它是模拟浏览器,因此它同样支持多种协议, FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE ...

  4. GIthub的小技巧

    目录: 一.快捷键一览表 二.快速搜索项目文件功能 三.使用Github Pages搭建项目网站 一.快捷键一览表 具体操作:         在各个页面下按下shift+/也就是?都可以打开键盘快捷 ...

  5. Java设计模式-命令模式(Command)

    命令模式很好理解,举个例子,司令员下令让士兵去干件事情,从整个事情的角度来考虑,司令员的作用是,发出口令,口令经过传递,传到了士兵耳朵里,士兵去执行.这个过程好在,三者相互解耦,任何一方都不用去依赖其 ...

  6. Java基础-关键字-String

    1.String的本质 线程安全 打开String的源码,类注释中有这么一段话“Strings are constant; their values cannot be changed after t ...

  7. JS~json日期格式化

    起因 对于从C#返回的日期字段,当进行JSON序列化后,在前台JS里显示的并不是真正的日期,这让我们感觉很不爽,我们不可能为了这东西,把所有日期字段都变成string吧,所以,找了一个JS的扩展方法, ...

  8. BZOJ-2875 随机数生成器 矩阵乘法快速幂+快速乘

    题目没给全,吃X了... 2875: [Noi2012]随机数生成器 Time Limit: 10 Sec Memory Limit: 512 MB Submit: 1479 Solved: 829 ...

  9. BZOJ-1207 打鼹鼠 DP(LIS)

    1207: [HNOI2004]打鼹鼠 Time Limit: 10 Sec Memory Limit: 162 MB Submit: 2276 Solved: 1116 [Submit][Statu ...

  10. 【codevs1257】 打砖块

    http://codevs.cn/problem/1257/ (题目链接) 题意 在等腰三角形上打砖块,总共有m发炮弹,每块砖有一个权值,求打出的最大权值 Solution 今天考试题,考场上的2个小 ...