quantopian / zipline

Zipline, a Pythonic Algorithmic Trading Library
https://www.zipline.io
Apache License 2.0
17.52k stars 4.71k forks source link

Fail to Connect to IPython kernel (Python 3.5) #2781

Closed albimaths closed 3 years ago

albimaths commented 3 years ago

Dear Zipline Maintainers,

Before I tell you about my issue, let me describe my environment:

Environment

* Operating System: Windows 10 * Python Version: Python 3.5.6 :: Anaconda, Inc. * Python Bitness: 64 * How did you install Zipline: (env_zipline) $ conda install -c Quantopian zipline * Python packages: # Name Version Build Channel alembic 0.7.7 py35_0 Quantopian asn1crypto 1.4.0 py_0 bcolz 0.12.1 np114py35_0 Quantopian blas 1.0 mkl bleach 3.2.1 py_0 anaconda blosc 1.20.0 h7bd577a_0 bottleneck 1.2.1 py35h452e1ab_1 bzip2 1.0.8 he774522_0 ca-certificates 2020.7.22 0 certifi 2018.8.24 py35_1 anaconda cffi 1.11.5 py35h74b6da3_1 chardet 3.0.4 py35_1 click 7.1.2 py_0 colorama 0.4.3 py_0 anaconda contextlib2 0.6.0.post1 py_0 cryptography 2.3.1 py35h74b6da3_0 decorator 4.4.2 py_0 defusedxml 0.6.0 py_0 anaconda empyrical 0.5.3 py35_0 Quantopian entrypoints 0.2.3 py35_2 anaconda h5py 2.8.0 py35h3bdd7fb_2 hdf5 1.10.2 hac2f561_1 icc_rt 2019.0.0 h0cc432a_1 icu 58.2 vc14hc45fdbb_0 [vc14] anaconda idna 2.7 py35_0 intel-openmp 2019.4 245 intervaltree 2.1.0 py35_0 Quantopian ipykernel 4.10.0 py35_0 anaconda ipython 5.8.0 py35_0 anaconda ipython_genutils 0.2.0 py35ha709e79_0 anaconda ipywidgets 7.4.1 py35_0 anaconda iso3166 0.9 py35_0 Quantopian iso4217 1.6.20180829 py35_0 Quantopian jinja2 2.11.2 py_0 anaconda jpeg 9b vc14h4d7706e_1 [vc14] anaconda jsonschema 2.6.0 py35h27d56d3_0 anaconda jupyter 1.0.0 py35_7 jupyter_client 5.3.3 py_0 anaconda jupyter_console 5.2.0 py35_1 anaconda jupyter_core 4.5.0 py_0 anaconda libiconv 1.15 h1df5818_7 libpng 1.6.32 vc14h5163883_3 [vc14] anaconda libsodium 1.0.16 h9d3ae62_0 anaconda libxml2 2.9.10 h464c3ec_1 libxslt 1.1.34 he774522_0 logbook 0.12.5 py35_0 Quantopian lru-dict 1.1.4 py35_0 Quantopian lxml 4.2.5 py35hef2cd61_0 lz4-c 1.9.2 h62dcd97_1 lzo 2.10 he774522_2 m2w64-gcc-libgfortran 5.3.0 6 m2w64-gcc-libs 5.3.0 7 m2w64-gcc-libs-core 5.3.0 7 m2w64-gmp 6.1.0 2 m2w64-libwinpthread-git 5.0.0.4634.697f757 2 mako 1.1.3 py_0 markupsafe 1.0 py35hfa6e2cd_1 mistune 0.8.3 py35hfa6e2cd_1 anaconda mkl 2018.0.3 1 msys2-conda-epoch 20160418 1 multipledispatch 0.6.0 py35_0 nbconvert 5.5.0 py_0 anaconda nbformat 5.0.7 py_0 anaconda networkx 1.11 py35_1 notebook 5.6.0 py35_0 anaconda numexpr 2.6.1 np114py35_0 Quantopian numpy 1.14.2 py35h5c71026_0 openssl 1.0.2u he774522_0 packaging 20.4 py_0 anaconda pandas 0.22.0 py35h6538335_0 pandas-datareader 0.8.1 py_0 pandoc 2.10.1 0 anaconda pandocfilters 1.4.2 py35_1 anaconda patsy 0.5.0 py35_0 pickleshare 0.7.4 py35h2f9f535_0 anaconda pip 10.0.1 py35_0 prometheus_client 0.8.0 py_0 anaconda prompt_toolkit 1.0.15 py35h89c7cb4_0 anaconda pycparser 2.20 py_2 pygments 2.7.1 py_0 anaconda pyopenssl 18.0.0 py35_0 pyparsing 2.4.7 py_0 anaconda pyqt 5.6.0 py35ha878b3d_6 anaconda pysocks 1.6.8 py35_0 pytables 3.4.4 py35he6f6034_0 python 3.5.6 he025d50_0 python-dateutil 2.8.1 py_0 python-interface 1.5.3 py35_0 Quantopian pytz 2020.1 py_0 pywinpty 0.5.4 py35_0 anaconda pyzmq 17.1.2 py35hfa6e2cd_0 anaconda qt 5.6.2 vc14h6f8c307_12 [vc14] anaconda qtconsole 4.7.7 py_0 anaconda qtpy 1.9.0 py_0 anaconda requests 2.20.1 py35_0 Quantopian scipy 1.1.0 py35hc28095f_0 send2trash 1.5.0 py35_0 anaconda setuptools 40.2.0 py35_0 simplegeneric 0.8.1 py35_2 anaconda sip 4.18.1 py35h6538335_2 anaconda six 1.15.0 py_0 snappy 1.1.8 h33f27b4_0 sortedcontainers 2.1.0 py35_0 Quantopian sqlalchemy 1.2.11 py35hfa6e2cd_0 sqlite 3.20.1 vc14h7ce8c62_1 [vc14] anaconda statsmodels 0.9.0 py35h452e1ab_0 terminado 0.8.1 py35_1 anaconda testpath 0.4.4 py_0 anaconda toolz 0.11.1 py_0 tornado 5.1.1 py35hfa6e2cd_0 anaconda trading-calendars 1.11.2 py35_0 Quantopian traitlets 4.3.2 py35h09b975b_0 anaconda urllib3 1.23 py35_0 vc 14.1 h0510ff6_4 vs2015_runtime 14.16.27012 hf0eaf9b_3 wcwidth 0.2.5 py_0 anaconda webencodings 0.5.1 py35_1 anaconda wheel 0.35.1 py_0 widgetsnbextension 3.4.1 py35_0 anaconda win_inet_pton 1.0.1 py35_1 win_unicode_console 0.5 py35h56988b5_0 anaconda wincertstore 0.2 py35hfebbdb8_0 winpty 0.4.3 4 anaconda xz 5.2.5 h62dcd97_0 zeromq 4.2.5 he025d50_1 anaconda zipline 1.4.0 np114py35_0 Quantopian zlib 1.2.11 h62dcd97_4 zstd 1.4.5 h04227a9_0 Now that you know a little about me, let me tell you about the issue I am having: # Description of Issue Hi everyone, I am trying to use the Python Interactive (command SHIFT + ENTER) using 'Python 3.5.6 654-bit ('env_zipline':conda)' but I receive the following errors: - Unable to start session for kernel Python 3.5.6 64-bit ('env_zipline': conda). Select another kernel to launch with. - Timed out waiting to get a heartbeat from kernel process. Usually I use Python 3.7.3. 64-bit ('base':conda) environment and I never ran into this issue. Python Interactive successfully start under Python 3.7.3. 64-bit kernel. I have no idea how to solve this issue. Could you kindly help me? I guess my issue is related to ipython kernel but I can't solve it. Here is how you can reproduce this issue on your machine: ## Reproduction Steps 1. conda create -n env_zipline python=3.5 2. conda activate env_zipline 3. (env_zipline) $ conda install -c Quantopian zipline 4. (env_zipline) $ conda install -c anaconda jupyter 5. import pandas as pd (run selection/line in python interactive window) 6. Connecting to IPython kernel: Connecting to kernel. Timed out waiting to get a heartbeat from kernel process. ## What steps have you taken to resolve this already? Installed different version of python extensions (didn't work) conda install ipykernel (didn't work) Sincerely, Alberto
albimaths commented 3 years ago

I solved it. I installed pywin32 and now it is working fine.

Bye