Fails on import
Closed this issue · 2 comments
ranaroussi commented
I get this error message when I try to import ibpythonic
...
>>> import ibpythonic
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "~/anaconda/lib/python3.6/site-packages/ibpythonic/__init__.py", line 29, in <module>
from ibpythonic.connection import Connection
File "~/anaconda/lib/python3.6/site-packages/ibpythonic/connection.py", line 20, in <module>
from ibpythonic.dispatcher import Dispatcher
File "~/anaconda/lib/python3.6/site-packages/ibpythonic/dispatcher.py", line 10, in <module>
from ibpythonic import message
File "~/anaconda/lib/python3.6/site-packages/ibpythonic/message.py", line 152, in <module>
eWrapperAccum = EWrapperAccumulator((EWrapper,))
File "~/anaconda/lib/python3.6/site-packages/ibpythonic/message.py", line 30, in __init__
self.visit(parse(open(filename).read()))
NotADirectoryError: [Errno 20] Not a directory: '~/anaconda/lib/python3.6/site-packages/ibapi-9.73.2-py3.6.egg/ibapi/wrapper.py'
brian-from-quantrocket commented
Your ibapi
is installed as an egg, and egg files aren't regular system files, so ibpythonic
can't open them to figure out what's in EWrapper
. setuptools will install ibapi
as an egg, but pip won't. So, in the directory containing ibapi
's setup.py
, don't install it like this :
python setup.py install
But rather like this:
pip install .
ranaroussi commented
Works now. Thanks!