简体   繁体   中英

Interactive Brokers with IbPy, API connection not working on Mac OsX

I am having some issues with connecting with Interactive Brokers API with IbPy. I am trying to import:

ib.opt import Connection, message not working

and the error message I get is: from ib.opt import Connection, message

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.9-intel/egg/ib/opt/__init__.py", line 30, in <module>
  File "build/bdist.macosx-10.9-intel/egg/ib/opt/connection.py", line 22, in <module>
  File "build/bdist.macosx-10.9-intel/egg/ib/opt/sender.py", line 11, in <module>
  File "build/bdist.macosx-10.9-intel/egg/ib/ext/EClientSocket.py", line 21, in <module>
  File "/Library/Python/2.7/site-packages/IbPy-0.7.6_9.51-py2.7.egg/ib/ext/EReader.py", line 29
SyntaxError: cannot assign to None

My research has pointed me to these sites but I still cant not fix the problem. any help is much appreciated.

https://code.google.com/p/ibpy/issues/detail?id=16

System Specs: OSX 10.9.5 (Maverick) Python 2.7.8

Thank you in advance.

@achampion solved the issues

either use easy_install or pip and run pip install IbPy==0.7.2-9.00; python -c 'from ib.opt import Connection, message'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM