IBridgePy Setup With Interactive Brokers Failed

  • Interactive Brokers Account in good standing
  • IBridgePy_Win_Anaconda36_64
  • Python 3.7 (Anaconda) 64 Bit

After setting the PYTONPATH manager to the directory where I unzipped the IBridge Py installation I opend RUN.ME.py in Spyder. After running the file I get the following error message:

Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 7.2.0 -- An enhanced Interactive Python.

runfile('C:/Users/Alexander/Downloads/IBridgePy/RUN_ME.py', wdir='C:/Users/Alexander/Downloads/IBridgePy')
Traceback (most recent call last):

  File "<ipython-input-1-6e5ded4ebf61>", line 1, in <module>
    runfile('C:/Users/Alexander/Downloads/IBridgePy/RUN_ME.py', wdir='C:/Users/Alexander/Downloads/IBridgePy')

  File "C:\Users\Alexander\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile
    execfile(filename, namespace)

  File "C:\Users\Alexander\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/Alexander/Downloads/IBridgePy/RUN_ME.py", line 38, in <module>
    exec(script)

  File "<string>", line 9, in <module>

  File "C:\Users\Alexander\Downloads\IBridgePy\IBridgePy\MarketManagerBase.py", line 6, in <module>
    import data_provider_factory

  File "C:\Users\Alexander\Downloads\IBridgePy\data_provider_factory\__init__.py", line 1, in <module>
    from .data_provider import DataProvider

  File "C:\Users\Alexander\Downloads\IBridgePy\data_provider_factory\data_provider.py", line 14, in <module>
    from IBridgePy.IbridgepyTools import calculate_startTime

  File "C:\Users\Alexander\Downloads\IBridgePy\IBridgePy\IbridgepyTools.py", line 23, in <module>
    from IBridgePy.quantopian import Security, from_security_to_contract, from_contract_to_security

  File "C:\Users\Alexander\Downloads\IBridgePy\IBridgePy\quantopian.py", line 5, in <module>
    from IBridgePy import IBCpp

ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.

Anyone who can help???

IBridgePy supports Python 2.7 and Python 3.6, not Python 3.5 and Python 3.7. You can uninstall Python 3.7 and install 3.6.



In case you are still facing the issue then share the error message and code with us to investigate further.



Thank you.



 

Hi,



I am getting the same error. I can see I have Python 3.6. PLease see the error below.



runfile('C:/Users/unni.tom/Documents/Chavaru/Python/IBridgePy_Win_Anaconda27_64/RUN_ME.py', wdir='C:/Users/unni.tom/Documents/Chavaru/Python/IBridgePy_Win_Anaconda27_64')

Reloaded modules: BasicPyLib, BasicPyLib.MarketCalendarWrapper, BasicPyLib.FakeMarketCalendar, BasicPyLib.MarketCalendar, BasicPyLib.pandas_market_calendars, BasicPyLib.pandas_market_calendars.market_calendar, BasicPyLib.pandas_market_calendars.calendar_utils, BasicPyLib.pandas_market_calendars.exchange_calendar_cfe, BasicPyLib.pandas_market_calendars.us_holidays, BasicPyLib.pandas_market_calendars.exchange_calendar_ice, BasicPyLib.pandas_market_calendars.exchange_calendar_nyse, BasicPyLib.pandas_market_calendars.exchange_calendar_cme, BasicPyLib.pandas_market_calendars.exchange_calendar_bmf, BasicPyLib.pandas_market_calendars.exchange_calendar_lse, BasicPyLib.pandas_market_calendars.exchange_calendar_tsx, BasicPyLib.pandas_market_calendars.exchange_calendar_eurex, IBridgePy, broker_client_factory, broker_client_factory.broker_client_utils, IBridgePy.constants, BasicPyLib.BasicTools, broker_service_factory, broker_service_factory.BrokerService, broker_client_factory.BrokerClientDefs, models, models.utils, broker_service_factory.BrokerService_utils, BasicPyLib.Printable

Traceback (most recent call last):



  File "<ipython-input-4-8d71370efb36>", line 1, in <module>

    runfile('C:/Users/unni.tom/Documents/Chavaru/Python/IBridgePy_Win_Anaconda27_64/RUN_ME.py', wdir='C:/Users/unni.tom/Documents/Chavaru/Python/IBridgePy_Win_Anaconda27_64')



  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile

    execfile(filename, namespace)



  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile

    exec(compile(f.read(), filename, 'exec'), namespace)



  File "C:/Users/unni.tom/Documents/Chavaru/Python/IBridgePy_Win_Anaconda27_64/RUN_ME.py", line 38, in <module>

    exec(script)



  File "<string>", line 9, in <module>



  File "C:\Users\unni.tom\Documents\Chavaru\Python\IBridgePy_Win_Anaconda27_64\IBridgePy\MarketManagerBase.py", line 7, in <module>

    import data_provider_factory



  File "C:\Users\unni.tom\Documents\Chavaru\Python\IBridgePy_Win_Anaconda27_64\data_provider_factory_init_.py", line 1, in <module>

    from .data_provider import DataProvider



  File "C:\Users\unni.tom\Documents\Chavaru\Python\IBridgePy_Win_Anaconda27_64\data_provider_factory\data_provider.py", line 14, in <module>

    from IBridgePy.IbridgepyTools import calculate_startTimePosition



  File "C:\Users\unni.tom\Documents\Chavaru\Python\IBridgePy_Win_Anaconda27_64\IBridgePy\IbridgepyTools.py", line 29, in <module>

    from IBridgePy import IBCpp



ImportError: DLL load failed: The specified module could not be found.

From the details that you've shared, here is what I can infer:

  1. You're using Python 3.64 (inferred from C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\spyder\utils\site\sitecustomize.py)
     
  2. The IBridgePy that you've downloaded is for Python 2.7 (inferred from C:/Users/unni.tom/Documents/Chavaru/Python/IBridgePy_Win_Anaconda27_64/RUN_ME.py)

As of today, IBridgePy supports following versions for Windows as per the information available from their website (http://www.ibridgepy.com/download/):
  1. Anaconda Python 2.7 32-bit
  2. Anaconda Python 2.7
  3. Anaconda Python 3.6
  4. Anaconda Python 3.7

I think if you download IBridgePy for "Anaconda Python 3.6" version, it should work. Please do let me know further.

Cool. Thanks Utsav. It is working now.