I am trying to simply connect to the ibapi (Interactive Brokers API), but I am having some technical troubles with Spyder.
What I did so far:
C:\TWS API\source\pythonclient\ibapi
afterwards I restarted SpyderWhen I simply type import ibapi
I get the same error message: ModuleNotFoundError: No module named 'ibapi'
What I am doing wrong here and how can I fix this simple error?
I don't use python very much but I'm pretty sure you have to install the ibapi. I never used the PYTHONPATH and mine works fine in Spyder and Jupyter. I'm using Anaconda.
I run the Anaconda prompt (just activates the conda environment) and navigate to the dir C:\TWS API\source\pythonclient
and run python setup.py install
Then everything works. I think many python packages need to be installed like this.
note: That's not my install dir, I just copied yours. There may be a problem with a space in the path. Try renaming to C:\TWSAPI\...
if you still have a problem.
Note: after python setup.py install
, you might need to restart spyder
. If doesn't help, then copy the newly-created ibapi
folder to:
C:\Users\iuzeri\AppData\Local\Programs\Python\Python37-32\Lib\site-packages
or
C:\Program Files (x86)\Python37-32\Lib\site-packages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With