alpacahq / pylivetrader

Python live trade execution library with zipline interface.
https://pypi.org/project/pylivetrader/
Apache License 2.0
661 stars 196 forks source link

ModuleNotFoundError: No module named '_Interface' #65

Closed AzureFractal closed 5 years ago

AzureFractal commented 5 years ago

Running the code for example q01, I get the following error:

C:\Users\owner\Desktop\College_Stuff\Quantopian\pylivetrader-master\examples\q01>pylivetrader run -f ./algo.py Traceback (most recent call last): File "c:\users\owner\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\owner\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Scripts\pylivetrader.exe\__main__.py", line 9, in <module> File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\click\core.py", line 722, in __call__ return self.main(*args, **kwargs) File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\click\core.py", line 697, in main rv = self.invoke(ctx) File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\click\core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\click\core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\click\core.py", line 535, in invoke return callback(*args, **kwargs) File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\click\decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\pylivetrader\__main__.py", line 141, in run ctx = process_algo_params(ctx, **kwargs) File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\pylivetrader\__main__.py", line 115, in process_algo_params algomodule = get_algomodule_by_path(algofile) File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\pylivetrader\loader.py", line 50, in get_algomodule_by_path return get_algomodule(file, filename) File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\pylivetrader\loader.py", line 63, in get_algomodule exec_(code, ns) File "algo.py", line 12, in <module> from pipeline_live.data.iex.pricing import USEquityPricing File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\pipeline_live\data\iex\pricing.py", line 1, in <module> from zipline.pipeline.data.dataset import Column, DataSet File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\zipline\__init__.py", line 29, in <module> from .utils.run_algo import run_algorithm File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\zipline\utils\run_algo.py", line 22, in <module> from zipline.pipeline.data import USEquityPricing File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\zipline\pipeline\__init__.py", line 3, in <module> from .classifiers import Classifier, CustomClassifier File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\zipline\pipeline\classifiers\__init__.py", line 1, in <module> from .classifier import ( File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\zipline\pipeline\classifiers\classifier.py", line 22, in <module> from zipline.pipeline.term import ComputableTerm File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\zipline\pipeline\term.py", line 47, in <module> from .domain import Domain, GENERIC, infer_domain File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\zipline\pipeline\domain.py", line 20, in <module> from interface import default, implements, Interface File "C:\Users\owner\AppData\Local\Programs\Python\Python36\Lib\site-packages\interface\__init__.py", line 75, in <module> from _Interface import Interface ModuleNotFoundError: No module named '_Interface'

I'm running on Windows 10, Python 3.6.5. This is my pip freeze: absl-py==0.2.2 aiodns==1.1.1 aiohttp==3.3.2 alembic==1.0.5 alpaca-trade-api==0.22 arrow==0.12.1 astor==0.6.2 astroid==1.6.5 async-timeout==3.0.0 asyncio-nats-client==0.8.2 atomicwrites==1.1.5 attrs==18.1.0 autopep8==1.3.5 awscli==1.15.59 backcall==0.1.0 backports-datetime-fromisoformat==0.0.1 bcolz==0.12.1 bintrees==2.0.7 bleach==1.5.0 boto==2.49.0 boto3==1.7.58 botocore==1.10.58 Bottleneck==1.2.1 bz2file==0.98 cchardet==2.1.1 ccxt==1.16.11 certifi==2018.4.16 chardet==3.0.4 click==6.7 cma==2.6.0 colorama==0.3.9 contextlib2==0.5.5 cupy==4.3.0+cuda92148 cycler==0.10.0 cyordereddict==1.0.0 Cython==0.29.1 decorator==4.3.0 deuces==0.2 Django==2.1.1 docutils==0.14 ed25519==1.4 empyrical==0.5.0 fastrlock==0.3 Flask==0.12.2 Flask-Cors==3.0.3 future==0.16.0 gast==0.2.0 gdax==1.0.6 gensim==3.5.0 GPy==1.8.4 graphviz==0.8.4 grpcio==1.12.1 gym==0.10.5 h5py==2.8.0 html5lib==0.9999999 ibapi==9.73.7 idna==2.6 idna-ssl==1.0.1 iexfinance==0.3.5 imageio==2.3.0 inflection==0.3.1 Interface==2.11.1 intervaltree==2.1.0 ipython==7.2.0 ipython-genutils==0.2.0 iso3166==0.9 isort==4.3.4 itsdangerous==0.24 jedi==0.13.1 Jinja2==2.10 jmespath==0.9.3 jsonfield==2.0.2 jsonpickle==0.9.6 Keras==2.2.0 Keras-Applications==1.0.2 Keras-Preprocessing==1.0.1 keras-rl==0.4.2 kiwisolver==1.0.1 lazy-object-proxy==1.3.1 Logbook==1.4.1 lru-dict==1.1.6 lxml==4.2.5 Mako==1.0.7 Markdown==2.6.11 MarkupSafe==1.0 matplotlib==2.2.2 mccabe==0.6.1 more-itertools==4.2.0 mss==3.2.1 multidict==4.3.1 multipledispatch==0.6.0 mysql-connector==2.1.6 mysqlclient==1.3.13 networkx==1.11 nltk==3.3 numexpr==2.6.8 numpy==1.14.6 opencv-python==3.4.1.15 pandas==0.20.3 pandas-datareader==0.7.0 paramz==0.9.2 parso==0.3.1 pathlib==1.0.1 patsy==0.5.1 pickleshare==0.7.5 Pillow==5.2.0 pipeline-live==0.1.4 pluggy==0.6.0 pokereval==0.1.2 prompt-toolkit==2.0.7 protobuf==3.6.0 psycopg2==2.7.3 py==1.5.4 pyasn1==0.4.3 pycares==2.3.0 pycodestyle==2.4.0 pyfiglet==0.7.5 pyglet==1.3.2 Pygments==2.3.0 PyJWT==1.6.4 pylint==1.9.2 pylivetrader==0.0.20 pynput==1.4 pyparsing==2.2.0 PyQt5==5.11.2 PyQt5-sip==4.19.12 PySocks==1.6.8 pytest==3.6.3 python-box==3.1.1 python-dateutil==2.7.3 python-editor==1.0.3 python-interface==1.5.0 pytz==2018.7 PyYAML==3.12 Quandl==3.4.5 requests==2.20.1 requests-file==1.4.3 rsa==3.4.2 s3transfer==0.1.13 scikit-learn==0.19.1 scikit-optimize==0.5.2 scipy==1.1.0 seaborn==0.8.1 six==1.10.0 sklearn==0.0 smart-open==1.6.0 sortedcontainers==2.1.0 SQLAlchemy==1.1.12 statsmodels==0.9.0 TA-Lib==0.4.17 tables==3.4.4 tensorboard==1.9.0 tensorflow==1.9.0 tensorflow-tensorboard==1.5.1 termcolor==1.1.0 toolz==0.9.0 tornado==5.1.1 tradersbot==0.2.5 trading-calendars==1.6.0 traitlets==4.3.2 twilio==6.16.4 urllib3==1.22 wcwidth==0.1.7 websocket-client==0.40.0 websockets==7.0 Werkzeug==0.14.1 wrapt==1.10.11 xgboost==0.72 yarl==1.1.0 zipline==1.3.0+217.g0975a2e5 zope.event==4.4 zope.interface==4.6.0 zope.schema==4.9.3

ttt733 commented 5 years ago

Hi @AzureFractal , if you're installing on Windows, you may need to try using the Anaconda installation, which will use Python 3.5 instead and potentially fix some issues. Please see https://docs.alpaca.markets/libraries/pylivetrader-windows/#install-with-anaconda-recommended for instructions and let us know if you're still encountering issues.

ttt733 commented 5 years ago

@AzureFractal, I'm going to close this issue, if Anaconda installation does not fix your problem, feel free to reopen with more info about what went wrong.