1

So I'm trying to use the IB API wrapper from here and I try running the first line

from ib_insync import * 

but am getting the following error:

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/ib_insync/__init__.py", line 10, in <module> import ibapi ModuleNotFoundError: No module named 'ibapi'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.7/site-packages/ib_insync/__init__.py", line 13, in <module> 'IB API from http://interactivebrokers.github.io is required') RuntimeError: IB API from http://interactivebrokers.github.io is required

but I've downloaded the IB API from the IB github (had to use The Unarchiver to unzip) and saved it on my desktop. As far as I can tell there's no pip3 command I can use to install it so I'm not sure what else I can do to install the IB API. I've allowed ticked all the boxes for the API in TWS. I'm not sure why it's not installing properly?

It seems to be the same issue found here but mine is for macosx. I've tried running the commands from README.md and they don't work. It just says no such directory exists.

bigboat
  • 249
  • 1
  • 4
  • 13

1 Answers1

0

Installing the a python module as a wheel is optional- its also possible to just include the path to the module in the PYTHONPATH environment variable. But if you're using the commands from the READ.ME to build and install a wheel, make sure you're in the pythonclient folder and then run:

python3 setup.py bdist_wheel
python3 -m pip install --user --upgrade dist/ibapi-9.75.1-py3-none-any.whl

Thats for the current API Latest version as of March 2019 which is 975.1

Josh
  • 706
  • 3
  • 8