Hi all, 

I set up all variables according to otbenv.bat and it worked in the command 
line
[image: 微信截图_20190511101233.png]
But it failed when I tried to import in spyder, it said:

import os
os.system('D:\OTB-6.6.1-Win64\otbenv.bat')
Out[4]: 0
import otbApplication
Traceback (most recent call last):
  File "<ipython-input-5-d390dade34a3>", line 1, in <module>
    import otbApplication
  File "D:\OTB-6.6.1-Win64\lib\python3\otbApplication.py", line 17, in 
<module>
    _otbApplication = swig_import_helper()
  File "D:\OTB-6.6.1-Win64\lib\python3\otbApplication.py", line 16, in 
swig_import_helper
    return importlib.import_module('_otbApplication')
  File "D:\Anaconda3_42\lib\importlib\__init__.py", line 126, in 
import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed.

My environment is win10 anaconda3 with python 3.5
The import error confused me for a long time. I will be appreciated if any 
hints can be given.

Thanks.
Yi Zhao


在 2018年10月22日星期一 UTC+8下午4:14:08,Guillaume Pasero写道:
>
> Hi,
>
> Does Anaconda use python3.5 ?
>
> Can you check if the applications Monteverdi or Mapla work ?
> Also, it seems to be a DLL loading error, do you have an error popup ? (in 
> english ...)
>
> Regards,
> Guillaume
>
> On 10/22/2018 04:00 AM, [email protected] <javascript:> wrote:
>
> Dear Guillaume 
>         Thank you for your help, but it still can not make 'import 
> otbApplication' run correctly. So, there may be other mistakes in it.
> 在2018年9月25日星期二17:25:35 UTC + 8,William Pasero写道: 
>>
>> 嗨,
>>
>> 我认为这是在您的PYTHONPATH一个错误,为Python 3中你不宜使用“C:\ OTB \ lib中\ python3”。
>> 它应该适用于3.5的Python
>> 此致,
>> 纪尧姆
>>
>> 在09/25/2018 04:33 AM,7816 ... @ qq.com写道 :
>>
>>
>> 亲爱的,
>>
>> 我设置OTB的系统路径(在系统属性>环境变量>系统变量1。PYTHONPATH> C. \ OTB \ lib中中\ python2路径> 
>> C:\ OTB \ BIN3 OTB_APPLICATION_PATH> C:\ OTB \ lib中中\ OTB \应用程序),但仍不能导入OTB 
>> correctly.I这有一个问题,当我在使用的进口Spyder的otbApplication“导入错误将会出现类似的论断: 
>>
>> 回溯(最近的呼叫最后):
>>
>> 在<module>中  输入文件“<ipython-input-1- 441603f327e2>”,第1行
>>     import otbApplication
>>
>>   文件“C:\ OTB \ lib中\ python3 \ otbApplication.py”,第21行,在<模块>
>>     _otbApplication = swig_import_helper()
>>
>>   文件“C:\ OTB \ LIB \ python3 \ 
>> otbApplication.py”,第20行,在swig_import_helper
>>     return importlib.import_module('_ otbApplication')
>>
>>   文件“C:\用户\ 78163 \ Anaconda3 \ lib中\ 导入库\ __ 
>> init__.py”,线路126,在import_module
>>     return _bootstrap._gcd_import(name [ level:],package,level)
>>
>> 导入错误:加载DLL失败
>>
>> 我必须让'import otbApplication'正确运行?
>> 欢迎所有想法!
>> - 
>> - 
>> 查看OTB常见问题解答,
>> 网址 <http://www.orfeo-toolbox.org/FAQ.html>为http://www.orfeo-toolbox.org/ 
>> <http://www.orfeo-toolbox.org/FAQ.html>的faq.html 
>> <http://www.orfeo-toolbox.org/FAQ.html>
>>  
>> 您收到此邮件的英文因为您订阅了谷歌
>> 网上论坛“OTB用户”群组。
>> 要在此论坛发帖,请发送电子邮件至OTB - ... @ googlegroups.com的
>> 要退订此论坛,请发送电子邮件至
>> OTB用户+ ... @ googlegroups.com的
>> 欲了解更多选项对话,此造访请群组
>> 的HTTP://组.google.com / 组/ OTB用户?HL = ZH 
>> <http://groups.google.com/group/otb-users?hl=en>
>> --- 
>> 您收到此邮件的英文因为您订阅了网上论坛谷歌“OTB用户”群组。
>> 要向此群组发送消息,请发送电子邮件至OTB用户+ ... @ googlegroups.com。
>> 有关更多选项,请访问https://groups.google.com/d/ 选择禁用 
>> <https://groups.google.com/d/optout>。
>>
>>
>> - 
>> <http://www.c-s.fr> *威廉PASERO*
>> 技术经理
>> *业务单位空间状语从句:地理信息-署有效载荷的数据和应用*
>>
>> *CS信息系统-*
>> 大平原公园- 5,街宫Moulinais Brindejonc - BP 15872 
>> 31506图卢兹的Cedex的05 -法国
>> 33 561 17 64 21 - Guillaum。 .. @ cs.fr 
>>
> -- 
> -- 
> Check the OTB FAQ at
> http://www.orfeo-toolbox.org/FAQ.html
>  
> You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To post to this group, send email to [email protected] 
> <javascript:>
> To unsubscribe from this group, send email to
> [email protected] <javascript:>
> For more options, visit this group at
> http://groups.google.com/group/otb-users?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "otb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> -- 
> <http://www.c-s.fr> *Guillaume PASERO*
> Responsable technique
> *Business Unit ESPACE & GeoInformation - Département Payload Data & 
> Applications*
>
> *CS Systèmes d'Information*
> Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
> 31506 Toulouse Cedex 05 - FRANCE
> +33 561 17 64 21 - [email protected] <javascript:> 
>

-- 
This mailing will be abandoned soon in favor of a more friendly forum:
https://forum.orfeo-toolbox.org
Thanks to visit it for any question related to Orfeo Toolbox (OTB) usage, or to 
check the OTB FAQ:
http://www.orfeo-toolbox.org/FAQ.html
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/otb-users/0b5fb31b-1017-4c1b-a183-bd59318d9629%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to