quantopian / zipline

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

Can't install with instructions for 3.5 and conda #2543

Open nateGeorge opened 5 years ago

nateGeorge commented 5 years ago

Dear Zipline Maintainers,

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

Environment

* Operating System: Ubuntu 18 LTS * Python Version: Anaconda 3.7, using 3.5 conda env * Python Bitness: 64 * How did you install Zipline: conda, then pip -- installing is the issue * Python packages: ```bash # packages in environment at /home/nate/anaconda3/envs/zipline: # # Name Version Build Channel _libgcc_mutex 0.1 main alembic 1.1.0 pypi_0 pypi backcall 0.1.0 pypi_0 pypi bcolz 0.12.1 pypi_0 pypi bottleneck 1.2.1 pypi_0 pypi ca-certificates 2019.5.15 1 certifi 2018.8.24 py35_1 chardet 3.0.4 pypi_0 pypi click 7.0 pypi_0 pypi contextlib2 0.5.5 pypi_0 pypi cyordereddict 1.0.0 pypi_0 pypi cython 0.29.13 pypi_0 pypi decorator 4.4.0 pypi_0 pypi empyrical 0.5.3 pypi_0 pypi idna 2.8 pypi_0 pypi intervaltree 3.0.2 pypi_0 pypi ipython 7.8.0 pypi_0 pypi ipython-genutils 0.2.0 pypi_0 pypi jedi 0.15.1 pypi_0 pypi libedit 3.1.20181209 hc058e9b_0 libffi 3.2.1 hd88cf55_4 libgcc-ng 9.1.0 hdf63c60_0 libstdcxx-ng 9.1.0 hdf63c60_0 logbook 1.5.2 pypi_0 pypi lru-dict 1.1.6 pypi_0 pypi lxml 4.4.1 pypi_0 pypi mako 1.1.0 pypi_0 pypi markupsafe 1.1.1 pypi_0 pypi mock 3.0.5 pypi_0 pypi multipledispatch 0.6.0 pypi_0 pypi ncurses 6.1 he6710b0_1 networkx 1.11 pypi_0 pypi numexpr 2.7.0 pypi_0 pypi numpy 1.17.2 pypi_0 pypi openssl 1.0.2t h7b6447c_1 pandas 0.22.0 pypi_0 pypi pandas-datareader 0.7.4 pypi_0 pypi parso 0.5.1 pypi_0 pypi patsy 0.5.1 pypi_0 pypi pexpect 4.7.0 pypi_0 pypi pickleshare 0.7.5 pypi_0 pypi pip 19.2.3 pypi_0 pypi prompt-toolkit 2.0.9 pypi_0 pypi ptyprocess 0.6.0 pypi_0 pypi pygments 2.4.2 pypi_0 pypi python 3.5.6 hc3d631a_0 python-dateutil 2.8.0 pypi_0 pypi python-editor 1.0.4 pypi_0 pypi pytz 2019.2 pypi_0 pypi readline 7.0 h7b6447c_5 requests 2.22.0 pypi_0 pypi requests-file 1.4.3 pypi_0 pypi scipy 1.3.1 pypi_0 pypi setuptools 40.2.0 py35_0 six 1.12.0 pypi_0 pypi sortedcontainers 2.1.0 pypi_0 pypi sqlalchemy 1.3.8 pypi_0 pypi sqlite 3.29.0 h7b6447c_0 statsmodels 0.10.1 pypi_0 pypi tables 3.5.2 pypi_0 pypi tk 8.6.8 hbc83047_0 toolz 0.10.0 pypi_0 pypi trading-calendars 1.8.1 pypi_0 pypi traitlets 4.3.2 pypi_0 pypi urllib3 1.25.3 pypi_0 pypi wcwidth 0.1.7 pypi_0 pypi wheel 0.31.1 py35_0 wrapt 1.11.2 pypi_0 pypi xz 5.2.4 h14c3975_4 zipline 1.3.0 pypi_0 pypi zlib 1.2.11 h7b6447c_3 ```

Description of Issue

Tried following the instructions here: https://www.zipline.io/install.html#conda

It came back with this error:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: | 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                     

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Package decorator conflicts for:
zipline -> decorator[version='>=4.0.0']
Package pandas-datareader conflicts for:
zipline -> pandas-datareader[version='>=0.2.1|>=0.2.1,<0.6']
Package libgfortran conflicts for:
zipline -> libgfortran==1
Package networkx conflicts for:
zipline -> networkx[version='>=1.9.1|>=1.9.1,<2.0']
Package setuptools conflicts for:
zipline -> setuptools[version='>18.0']
Package patsy conflicts for:
zipline -> patsy[version='>=0.4.0']
Package sqlalchemy conflicts for:
zipline -> sqlalchemy[version='>=1.0.8']
Package matplotlib conflicts for:
zipline -> matplotlib
Package markupsafe conflicts for:
zipline -> markupsafe[version='>=0.23']
Package libffi conflicts for:
python=3.5 -> libffi[version='3.2.*|>=3.2.1,<4.0a0']
Package pandas conflicts for:
zipline -> pandas[version='>=0.16.1|>=0.16.1,<0.18|>=0.17.1|>=0.17.1,<0.18|>=0.18.1,<0.19|>=0.18.1,<=0.22']
Package numpy conflicts for:
zipline -> numpy[version='1.10.*|1.11.*|1.7.*|1.8.*|1.9.*|>=1.11,<1.12.0a0|>=1.14,<1.15.0a0']
Package libgcc-ng conflicts for:
python=3.5 -> libgcc-ng[version='>=7.2.0|>=7.3.0']
Package openssl conflicts for:
python=3.5 -> openssl[version='1.0.*|1.0.*,>=1.0.2l,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2n,<1.0.3a|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a']
Package six conflicts for:
zipline -> six[version='>=1.10.0|>=1.9.0']
Package logbook conflicts for:
zipline -> logbook[version='>=0.12.5']
Package pip conflicts for:
python=3.5 -> pip
zipline -> pip[version='>=7.1.0']
Package contextlib2 conflicts for:
zipline -> contextlib2[version='>=0.4.0']
Package numexpr conflicts for:
zipline -> numexpr[version='>=2.4.3|>=2.4.6|>=2.6.1']
Package ncurses conflicts for:
python=3.5 -> ncurses[version='6.0.*|>=6.0,<7.0a0|>=6.1,<7.0a0']
Package zlib conflicts for:
python=3.5 -> zlib[version='>=1.2.11,<1.3.0a0']
Package scipy conflicts for:
zipline -> scipy[version='>=0.15.1|>=0.16.1|>=0.17.1']
Package click conflicts for:
zipline -> click[version='>=4.0.0']
Package cachetools conflicts for:
zipline -> cachetools[version='>=1.1.5']
Package requests conflicts for:
zipline -> requests[version='>=2.9.1']
Package statsmodels conflicts for:
zipline -> statsmodels[version='>=0.6.1']
Package python-dateutil conflicts for:
zipline -> python-dateutil[version='>=2.4.2']
Package multipledispatch conflicts for:
zipline -> multipledispatch[version='>=0.4.8']
Package trading-calendars conflicts for:
zipline -> trading-calendars[version='>=1.0.1']
Package bottleneck conflicts for:
zipline -> bottleneck[version='>=1.0.0']
Package intervaltree conflicts for:
zipline -> intervaltree[version='>=2.1.0']
Package readline conflicts for:
python=3.5 -> readline[version='7.*|>=7.0,<8.0a0']
Package bcolz conflicts for:
zipline -> bcolz[version='>=0.12.1|>=0.12.1,<1']
Package lru-dict conflicts for:
zipline -> lru-dict[version='>=1.1.4']
Package pytables conflicts for:
zipline -> pytables[version='>=3.3.0']
Package libstdcxx-ng conflicts for:
python=3.5 -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
Package pytz conflicts for:
zipline -> pytz[version='>=2015.4|>=2016.4']
Package alembic conflicts for:
zipline -> alembic[version='>=0.7.7']
Package sqlite conflicts for:
python=3.5 -> sqlite[version='>=3.20.1,<4.0a0|>=3.22.0,<4.0a0|>=3.23.1,<4.0a0|>=3.24.0,<4.0a0']
Package empyrical conflicts for:
zipline -> empyrical[version='>=0.1.11|>=0.2.2|>=0.4.2|>=0.5.0']
Package mako conflicts for:
zipline -> mako[version='>=1.0.1']
Package cyordereddict conflicts for:
zipline -> cyordereddict[version='>=0.2.2']
Package ta-lib conflicts for:
zipline -> ta-lib
Package tk conflicts for:
python=3.5 -> tk[version='8.6.*|>=8.6.7,<8.7.0a0']
Package requests-file conflicts for:
zipline -> requests-file[version='>=1.4.1']
Package sortedcontainers conflicts for:
zipline -> sortedcontainers[version='>=1.4.4']
Package cython conflicts for:
zipline -> cython[version='>=0.22.1|>=0.25.2']
Package toolz conflicts for:
zipline -> toolz[version='>=0.7.4|>=0.8.2']
Package xz conflicts for:
python=3.5 -> xz[version='>=5.2.3,<6.0a0|>=5.2.4,<6.0a0']

My best guess is Anaconda changed something since the instructions were issued, and it no longer works. However, using pip to install (pip install zipline) seems to work just fine.

Here is how you can reproduce this issue on your machine:

Reproduction Steps

Make sure you have Anaconda installed and updated conda with conda update conda.

  1. conda create -n env_zipline python=3.5
  2. source activate env_zipline
  3. conda install -c Quantopian zipline

What steps have you taken to resolve this already?

Use pip to install instead.

Thanks, Nate

ZBedjaJohnson commented 5 years ago

I am experiencing same issue. was fine a week ago.

geomuse commented 5 years ago

i saw this video to fix my problem , https://www.youtube.com/watch?v=J4LTIixReMA

you can try it ~

colinalexander commented 4 years ago

I too have this same issue (Mac OS X Catalina 10.15.1). The video was not helpful for this case.

geomuse commented 4 years ago

can you show us your env ? use conda list

colinalexander commented 4 years ago
% conda list
# packages in environment at /Users/ca_mini/opt/miniconda3/envs/zipline:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.8                h01d97ff_1    conda-forge
ca-certificates           2019.11.28           hecc5488_0    conda-forge
certifi                   2018.8.24             py35_1001    conda-forge
libcxx                    9.0.0                h89e68fa_1    conda-forge
libffi                    3.2.1             h6de7cb9_1006    conda-forge
ncurses                   6.1               h0a44026_1002    conda-forge
openssl                   1.0.2t               h1de35cc_0    conda-forge
pip                       18.0                  py35_1001    conda-forge
python                    3.5.5                h5001a0f_2    conda-forge
readline                  7.0               hcfe32e1_1001    conda-forge
setuptools                40.4.3                   py35_0    conda-forge
sqlite                    3.28.0               h9721f7c_0    conda-forge
tk                        8.6.10               hbbe82c9_0    conda-forge
wheel                     0.32.0                py35_1000    conda-forge
xz                        5.2.4             h1de35cc_1001    conda-forge
zlib                      1.2.11            h0b31af3_1006    conda-forge

% conda install -c Quantopian zipline
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \ 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                          

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Package intervaltree conflicts for:
zipline -> intervaltree[version='>=2.1.0']
Package wheel conflicts for:
pip -> wheel
Package networkx conflicts for:
zipline -> networkx[version='>=1.9.1|>=1.9.1,<2.0']
Package decorator conflicts for:
zipline -> decorator[version='>=4.0.0']
Package multipledispatch conflicts for:
zipline -> multipledispatch[version='>=0.4.8']
Package requests conflicts for:
zipline -> requests[version='>=2.9.1']
Package alembic conflicts for:
zipline -> alembic[version='>=0.7.7']
Package tk conflicts for:
python=3.5.5 -> tk[version='8.6.*|>=8.6.8,<8.7.0a0']
Package mako conflicts for:
zipline -> mako[version='>=1.0.1']
Package markupsafe conflicts for:
zipline -> markupsafe[version='>=0.23']
Package pip conflicts for:
python=3.5.5 -> pip
zipline -> pip[version='>=7.1.0']
Package pytables conflicts for:
zipline -> pytables[version='>=3.3.0']
Package readline conflicts for:
python=3.5.5 -> readline[version='7.0|>=7.0,<8.0a0']
sqlite -> readline[version='6.2.*|7.0.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0']
Package pytz conflicts for:
zipline -> pytz[version='>=2015.4|>=2016.4']
Package zlib conflicts for:
tk -> zlib[version='>=1.2.11,<1.3.0a0']
python=3.5.5 -> zlib[version='1.2.11|>=1.2.11,<1.3.0a0']
Package logbook conflicts for:
zipline -> logbook[version='>=0.12.5']
Package libcxx conflicts for:
libffi -> libcxx[version='>=4.0.1']
ncurses -> libcxx[version='>=4.0.1']
sqlite -> libcxx[version='>=4.0.1']
Package python-dateutil conflicts for:
zipline -> python-dateutil[version='>=2.4.2']
Package cython conflicts for:
zipline -> cython[version='>=0.22.1|>=0.25.2']
Package certifi conflicts for:
setuptools -> certifi[version='>=2016.09|>=2016.9.26']
Package bzip2 conflicts for:
python=3.5.5 -> bzip2[version='>=1.0.6,<2.0a0']
Package requests-file conflicts for:
zipline -> requests-file[version='>=1.4.1']
Package toolz conflicts for:
zipline -> toolz[version='>=0.7.4|>=0.8.2']
Package lru-dict conflicts for:
zipline -> lru-dict[version='>=1.1.4']
Package pandas conflicts for:
zipline -> pandas[version='>=0.16.1|>=0.16.1,<0.18|>=0.18.1,<0.19|>=0.18.1,<=0.22']
Package cyordereddict conflicts for:
zipline -> cyordereddict[version='>=0.2.2']
Package patsy conflicts for:
zipline -> patsy[version='>=0.4.0']
Package setuptools conflicts for:
wheel -> setuptools
zipline -> setuptools[version='>18.0']
pip -> setuptools
Package ca-certificates conflicts for:
openssl -> ca-certificates
Package openssl conflicts for:
python=3.5.5 -> openssl[version='1.0.*|>=1.0.2o,<1.0.3a']
Package libcxxabi conflicts for:
libcxx -> libcxxabi[version='4.0.1|8.0.0|8.0.0|8.0.0|8.0.0|8.0.1',build='3|2|hcfea43d_1|hebd6815_0|1|4|0']
Package ncurses conflicts for:
sqlite -> ncurses[version='5.9|5.9.*|>=6.1,<6.2.0a0']
python=3.5.5 -> ncurses[version='>=6.1,<6.2.0a0']
readline -> ncurses[version='5.9.*|6.0.*|>=6.0,<7.0a0|>=6.1,<6.2.0a0|>=6.1,<7.0a0']
Package contextlib2 conflicts for:
zipline -> contextlib2[version='>=0.4.0']
Package statsmodels conflicts for:
zipline -> statsmodels[version='>=0.6.1']
Package bottleneck conflicts for:
zipline -> bottleneck[version='>=1.0.0']
Package click conflicts for:
zipline -> click[version='>=4.0.0']
Package numexpr conflicts for:
zipline -> numexpr[version='>=2.4.3|>=2.4.6|>=2.6.1']
Package scipy conflicts for:
zipline -> scipy[version='>=0.15.1|>=0.17.1']
Package sqlalchemy conflicts for:
zipline -> sqlalchemy[version='>=1.0.8']
Package sqlite conflicts for:
python=3.5.5 -> sqlite[version='3.20.*|>=3.24.0,<4.0a0']
Package xz conflicts for:
python=3.5.5 -> xz[version='5.2.*|>=5.2.3,<5.3.0a0']
Package ta-lib conflicts for:
zipline -> ta-lib
Package libffi conflicts for:
python=3.5.5 -> libffi[version='>=3.2.1,<3.3.0a0']
Package matplotlib conflicts for:
zipline -> matplotlib
Package sortedcontainers conflicts for:
zipline -> sortedcontainers[version='>=1.4.4']
Package trading-calendars conflicts for:
zipline -> trading-calendars[version='>=1.0.1']
Package pandas-datareader conflicts for:
zipline -> pandas-datareader[version='>=0.2.1|>=0.2.1,<0.6']
Package numpy conflicts for:
zipline -> numpy[version='1.10.*|1.8.*|1.9.*|>=1.11,<1.12.0a0|>=1.14,<1.15.0a0']
Package bcolz conflicts for:
zipline -> bcolz[version='>=0.12.1|>=0.12.1,<1']
Package six conflicts for:
zipline -> six[version='>=1.10.0|>=1.9.0']
Package empyrical conflicts for:
zipline -> empyrical[version='>=0.1.11|>=0.2.2|>=0.4.2|>=0.5.0']
Package cachetools conflicts for:
zipline -> cachetools[version='>=1.1.5']
Note that strict channel priority may have removed packages required for satisfiability.
RichardDale commented 4 years ago

Zipline is incompatible with Conda v4.7.x for some reason.

Until the Zipline devs make it compatible you'll need to downgrade Conda to v4.6.11

conda config --set allow_conda_downgrades true conda install conda=4.6.11

colinalexander commented 4 years ago

After running:

% conda config --set allow_conda_downgrades true
% conda install conda=4.6.11  # Also tried 4.5.10
% conda install -c Quantopian zipline

I still get the following conflicts:

Package logbook conflicts for:
zipline -> logbook[version='>=0.12.5']
Package libcxx conflicts for:
libffi -> libcxx[version='>=4.0.1']
sqlite -> libcxx[version='>=4.0.1']
ncurses -> libcxx[version='>=4.0.1']
Package pip conflicts for:
python=3.5.5 -> pip
zipline -> pip[version='>=7.1.0']
Package pytables conflicts for:
zipline -> pytables[version='>=3.3.0']
Package requests-file conflicts for:
zipline -> requests-file[version='>=1.4.1']
Package libffi conflicts for:
python=3.5.5 -> libffi[version='>=3.2.1,<3.3.0a0']
Package networkx conflicts for:
zipline -> networkx[version='>=1.9.1|>=1.9.1,<2.0']
Package mako conflicts for:
zipline -> mako[version='>=1.0.1']
Package patsy conflicts for:
zipline -> patsy[version='>=0.4.0']
Package ca-certificates conflicts for:
openssl -> ca-certificates
Package sqlalchemy conflicts for:
zipline -> sqlalchemy[version='>=1.0.8']
Package readline conflicts for:
python=3.5.5 -> readline[version='7.0|>=7.0,<8.0a0']
sqlite -> readline[version='6.2.*|7.0.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0']
Package lru-dict conflicts for:
zipline -> lru-dict[version='>=1.1.4']
Package pytz conflicts for:
zipline -> pytz[version='>=2015.4|>=2016.4']
Package ncurses conflicts for:
sqlite -> ncurses[version='5.9|5.9.*|>=6.1,<6.2.0a0']
readline -> ncurses[version='5.9.*|6.0.*|>=6.0,<7.0a0|>=6.1,<6.2.0a0|>=6.1,<7.0a0']
python=3.5.5 -> ncurses[version='>=6.1,<6.2.0a0']
Package openssl conflicts for:
python=3.5.5 -> openssl[version='1.0.*|>=1.0.2o,<1.0.3a']
Package zlib conflicts for:
python=3.5.5 -> zlib[version='1.2.11|>=1.2.11,<1.3.0a0']
tk -> zlib[version='>=1.2.11,<1.3.0a0']
Package intervaltree conflicts for:
zipline -> intervaltree[version='>=2.1.0']
Package contextlib2 conflicts for:
zipline -> contextlib2[version='>=0.4.0']
Package six conflicts for:
zipline -> six[version='>=1.10.0|>=1.9.0']
Package numexpr conflicts for:
zipline -> numexpr[version='>=2.4.3|>=2.4.6|>=2.6.1']
Package pandas conflicts for:
zipline -> pandas[version='>=0.16.1|>=0.16.1,<0.18|>=0.18.1,<0.19|>=0.18.1,<=0.22']
Package click conflicts for:
zipline -> click[version='>=4.0.0']
Package markupsafe conflicts for:
zipline -> markupsafe[version='>=0.23']
Package toolz conflicts for:
zipline -> toolz[version='>=0.7.4|>=0.8.2']
Package requests conflicts for:
zipline -> requests[version='>=2.9.1']
Package matplotlib conflicts for:
zipline -> matplotlib
Package statsmodels conflicts for:
zipline -> statsmodels[version='>=0.6.1']
Package certifi conflicts for:
setuptools -> certifi[version='>=2016.09|>=2016.9.26']
Package bottleneck conflicts for:
zipline -> bottleneck[version='>=1.0.0']
Package ta-lib conflicts for:
zipline -> ta-lib
Package cachetools conflicts for:
zipline -> cachetools[version='>=1.1.5']
Package wheel conflicts for:
pip -> wheel
Package multipledispatch conflicts for:
zipline -> multipledispatch[version='>=0.4.8']
Package bzip2 conflicts for:
python=3.5.5 -> bzip2[version='>=1.0.6,<2.0a0']
Package setuptools conflicts for:
zipline -> setuptools[version='>18.0']
wheel -> setuptools
pip -> setuptools
Package python-dateutil conflicts for:
zipline -> python-dateutil[version='>=2.4.2']
Package scipy conflicts for:
zipline -> scipy[version='>=0.15.1|>=0.17.1']
Package cyordereddict conflicts for:
zipline -> cyordereddict[version='>=0.2.2']
Package alembic conflicts for:
zipline -> alembic[version='>=0.7.7']
Package sqlite conflicts for:
python=3.5.5 -> sqlite[version='3.20.*|>=3.24.0,<4.0a0']
Package cython conflicts for:
zipline -> cython[version='>=0.22.1|>=0.25.2']
Package tk conflicts for:
python=3.5.5 -> tk[version='8.6.*|>=8.6.8,<8.7.0a0']
Package xz conflicts for:
python=3.5.5 -> xz[version='5.2.*|>=5.2.3,<5.3.0a0']
Package libcxxabi conflicts for:
libcxx -> libcxxabi[version='4.0.1|8.0.0|8.0.0|8.0.0|8.0.0|8.0.1',build='0|4|1|hcfea43d_1|hebd6815_0|2|3']
Package decorator conflicts for:
zipline -> decorator[version='>=4.0.0']
Package trading-calendars conflicts for:
zipline -> trading-calendars[version='>=1.0.1']
Package empyrical conflicts for:
zipline -> empyrical[version='>=0.1.11|>=0.2.2|>=0.4.2|>=0.5.0']
Package bcolz conflicts for:
zipline -> bcolz[version='>=0.12.1|>=0.12.1,<1']
Package numpy conflicts for:
zipline -> numpy[version='1.10.*|1.8.*|1.9.*|>=1.11,<1.12.0a0|>=1.14,<1.15.0a0']
Package sortedcontainers conflicts for:
zipline -> sortedcontainers[version='>=1.4.4']
Package pandas-datareader conflicts for:
zipline -> pandas-datareader[version='>=0.2.1|>=0.2.1,<0.6']
Note that strict channel priority may have removed packages required for satisfiability.
ghost commented 4 years ago

probably you are using the zsh sell instead the bash sell.

If so, check if your conda environment is still linked to ~/.bash_profile

Then, copy the content from ~/.bash_profile file and paste into the ~/.zshrc file, restart the terminal and it should work.

El 3 dic 2019, a las 1:48, Colin Alexander notifications@github.com escribió:

After running:

% conda config --set allow_conda_downgrades true % conda install conda=4.6.11 # Also tried 4.5.10 % conda install -c Quantopian zipline

I still get the following conflicts:

Package logbook conflicts for: zipline -> logbook[version='>=0.12.5'] Package libcxx conflicts for: libffi -> libcxx[version='>=4.0.1'] sqlite -> libcxx[version='>=4.0.1'] ncurses -> libcxx[version='>=4.0.1'] Package pip conflicts for: python=3.5.5 -> pip zipline -> pip[version='>=7.1.0'] Package pytables conflicts for: zipline -> pytables[version='>=3.3.0'] Package requests-file conflicts for: zipline -> requests-file[version='>=1.4.1'] Package libffi conflicts for: python=3.5.5 -> libffi[version='>=3.2.1,<3.3.0a0'] Package networkx conflicts for: zipline -> networkx[version='>=1.9.1|>=1.9.1,<2.0'] Package mako conflicts for: zipline -> mako[version='>=1.0.1'] Package patsy conflicts for: zipline -> patsy[version='>=0.4.0'] Package ca-certificates conflicts for: openssl -> ca-certificates Package sqlalchemy conflicts for: zipline -> sqlalchemy[version='>=1.0.8'] Package readline conflicts for: python=3.5.5 -> readline[version='7.0|>=7.0,<8.0a0'] sqlite -> readline[version='6.2.|7.0.|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0'] Package lru-dict conflicts for: zipline -> lru-dict[version='>=1.1.4'] Package pytz conflicts for: zipline -> pytz[version='>=2015.4|>=2016.4'] Package ncurses conflicts for: sqlite -> ncurses[version='5.9|5.9.|>=6.1,<6.2.0a0'] readline -> ncurses[version='5.9.|6.0.|>=6.0,<7.0a0|>=6.1,<6.2.0a0|>=6.1,<7.0a0'] python=3.5.5 -> ncurses[version='>=6.1,<6.2.0a0'] Package openssl conflicts for: python=3.5.5 -> openssl[version='1.0.|>=1.0.2o,<1.0.3a'] Package zlib conflicts for: python=3.5.5 -> zlib[version='1.2.11|>=1.2.11,<1.3.0a0'] tk -> zlib[version='>=1.2.11,<1.3.0a0'] Package intervaltree conflicts for: zipline -> intervaltree[version='>=2.1.0'] Package contextlib2 conflicts for: zipline -> contextlib2[version='>=0.4.0'] Package six conflicts for: zipline -> six[version='>=1.10.0|>=1.9.0'] Package numexpr conflicts for: zipline -> numexpr[version='>=2.4.3|>=2.4.6|>=2.6.1'] Package pandas conflicts for: zipline -> pandas[version='>=0.16.1|>=0.16.1,<0.18|>=0.18.1,<0.19|>=0.18.1,<=0.22'] Package click conflicts for: zipline -> click[version='>=4.0.0'] Package markupsafe conflicts for: zipline -> markupsafe[version='>=0.23'] Package toolz conflicts for: zipline -> toolz[version='>=0.7.4|>=0.8.2'] Package requests conflicts for: zipline -> requests[version='>=2.9.1'] Package matplotlib conflicts for: zipline -> matplotlib Package statsmodels conflicts for: zipline -> statsmodels[version='>=0.6.1'] Package certifi conflicts for: setuptools -> certifi[version='>=2016.09|>=2016.9.26'] Package bottleneck conflicts for: zipline -> bottleneck[version='>=1.0.0'] Package ta-lib conflicts for: zipline -> ta-lib Package cachetools conflicts for: zipline -> cachetools[version='>=1.1.5'] Package wheel conflicts for: pip -> wheel Package multipledispatch conflicts for: zipline -> multipledispatch[version='>=0.4.8'] Package bzip2 conflicts for: python=3.5.5 -> bzip2[version='>=1.0.6,<2.0a0'] Package setuptools conflicts for: zipline -> setuptools[version='>18.0'] wheel -> setuptools pip -> setuptools Package python-dateutil conflicts for: zipline -> python-dateutil[version='>=2.4.2'] Package scipy conflicts for: zipline -> scipy[version='>=0.15.1|>=0.17.1'] Package cyordereddict conflicts for: zipline -> cyordereddict[version='>=0.2.2'] Package alembic conflicts for: zipline -> alembic[version='>=0.7.7'] Package sqlite conflicts for: python=3.5.5 -> sqlite[version='3.20.|>=3.24.0,<4.0a0'] Package cython conflicts for: zipline -> cython[version='>=0.22.1|>=0.25.2'] Package tk conflicts for: python=3.5.5 -> tk[version='8.6.|>=8.6.8,<8.7.0a0'] Package xz conflicts for: python=3.5.5 -> xz[version='5.2.|>=5.2.3,<5.3.0a0'] Package libcxxabi conflicts for: libcxx -> libcxxabi[version='4.0.1|8.0.0|8.0.0|8.0.0|8.0.0|8.0.1',build='0|4|1|hcfea43d_1|hebd6815_0|2|3'] Package decorator conflicts for: zipline -> decorator[version='>=4.0.0'] Package trading-calendars conflicts for: zipline -> trading-calendars[version='>=1.0.1'] Package empyrical conflicts for: zipline -> empyrical[version='>=0.1.11|>=0.2.2|>=0.4.2|>=0.5.0'] Package bcolz conflicts for: zipline -> bcolz[version='>=0.12.1|>=0.12.1,<1'] Package numpy conflicts for: zipline -> numpy[version='1.10.|1.8.|1.9.|>=1.11,<1.12.0a0|>=1.14,<1.15.0a0'] Package sortedcontainers conflicts for: zipline -> sortedcontainers[version='>=1.4.4'] Package pandas-datareader conflicts for: zipline -> pandas-datareader[version='>=0.2.1|>=0.2.1,<0.6'] Note that strict channel priority may have removed packages required for satisfiability. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/quantopian/zipline/issues/2543?email_source=notifications&email_token=AAQOLRLBP6YFDOSQX3JG6ULQWWUFBA5CNFSM4IWYVGOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFXV6RQ#issuecomment-560947014, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQOLRNVEENBWIWUCEF7AS3QWWUFBANCNFSM4IWYVGOA.

geomuse commented 4 years ago

in my case ,

conda create -n name python=3.5 source activate name conda install -c Quantopian zipline pip install jupyter

show me your env , if you try my case .

colinalexander commented 4 years ago

Yes, I am using zsh in Apple OS X Catalina (10.15.1). I managed to install zipline per the method below.

Before posting above, I previously ran conda config zsh. This is the relevant portion of my ~/.zshrc file:

# Miniconda3
# export PATH="$HOME/opt/miniconda3/bin:$PATH"  # commented out by conda initialize
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/ca_mini/opt/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/ca_mini/opt/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/ca_mini/opt/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/ca_mini/opt/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

I uninstalled miniconda and then ran anaconda-clean:

conda install -y anaconda-clean  # From base environment.
anaconda-clean --yes
rm -rf ~/miniconda3

I then manually scrubbed my .bashrc, .bash_profile, .profile and .zshrc files, including the code snippet above, removing all references to miniconda.

I downloaded an older version of miniconda3 (4.5.4, June 6, 2018) from the archive: https://repo.continuum.io/miniconda/Miniconda3-4.5.4-MacOSX-x86_64.sh and then installed it using zsh (% zsh Downloads/Miniconda3-4.5.4-MacOSX-x86_64.sh). I chose NOT to install the path to my .bash_profile. Note that conda config zsh does not work on this older version of conda.

I added the following to my ~/.zshrc file:

. /Users/ca_mini/miniconda3/etc/profile.d/conda.sh
conda activate

In a new terminal window, I then ran:

# Install Jupyter in the base environment.
conda install -y jupyter  # In base environment.

# Create and activate new environment named `zipline`.
conda create -yn zipline python=3.5 ipykernel  
conda activate zipline

# Install zipline.
conda install -yc Quantopian zipline

# Add zipline environment to Jupyter kernels.
python -m ipykernel install --user --name zipline --display-name "Python 3.5 (zipline)"

# Go back to base environment and update conda to newest version.
conda deactivate  # Back to base environment.
conda update -y conda

I am now able to import zipline!

When I originally tried to activate the new environment, I noticed the following output following a CommandNotFound error:

Previous to conda 4.4, the recommended way to activate conda was to modify PATH in
your ~/.bash_profile file.  You should manually remove the line that looks like

    export PATH="/Users/ca_mini/miniconda3/bin:$PATH"

^^^ The above line should NO LONGER be in your ~/.bash_profile file! ^^^

As this was part of my path, perhaps that caused the issue?

ghost commented 4 years ago

In my case, zsh shell couldn't see the Conda commands and environments, the .zshrc was empty. I just had to copy the content from ~/.bash_profile to ~/.zshrc and everything worked again. I haven't deleted or uninstalled anything.

One of the many surprises with Apple's new update ;)

El 5 dic 2019, a las 1:47, Colin Alexander notifications@github.com escribió:

Yes, I am using zsh in Apple OS X Catalina (10.15.1). I managed to install zipline per the method below.

Before posting above, I previously ran conda config zsh. This is the relevant portion of my ~/.zshrc file:

Miniconda3

export PATH="$HOME/opt/miniconda3/bin:$PATH" # commented out by conda initialize

>>> conda initialize >>>

!! Contents within this block are managed by 'conda init' !!

conda_setup="$('/Users/ca_mini/opt/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$conda_setup" else if [ -f "/Users/ca_mini/opt/miniconda3/etc/profile.d/conda.sh" ]; then . "/Users/ca_mini/opt/miniconda3/etc/profile.d/conda.sh" else export PATH="/Users/ca_mini/opt/miniconda3/bin:$PATH" fi fi unset __conda_setup

<<< conda initialize <<<

I have removed miniconda, ran anaconda-clean and scrubbed my .bashrc, .bash_profile, .profile and .zshrc files, including the code snippet above.

I downloaded an older version of miniconda3 (4.5.4, June 6, 2018): https://repo.continuum.io/miniconda/Miniconda3-4.5.4-MacOSX-x86_64.sh https://repo.continuum.io/miniconda/Miniconda3-4.5.4-MacOSX-x86_64.sh and then installed it using zsh (% zsh Downloads/Miniconda3-4.5.4-MacOSX-x86_64.sh). I chose NOT to install the path to my .bash_profile. Note that conda config zsh does not work on this older version of conda.

I added the following to my ~/.zshrc file:

. /Users/ca_mini/miniconda3/etc/profile.d/conda.sh conda activate In a new terminal window, I then ran:

conda install Jupyter # In base environment. conda create -n zipline python=3.5 conda activate zipline conda install -c Quantopian zipline conda install ipykernel python -m ipykernel install --user --name zipline --display-name "Python 3.5 (zipline)" conda update conda I am now able to import zipline!

When I originally tried to activate the new environment, I noticed the following output following a CommandNotFound error:

Previous to conda 4.4, the recommended way to activate conda was to modify PATH in your ~/.bash_profile file. You should manually remove the line that looks like

export PATH="/Users/ca_mini/miniconda3/bin:$PATH"

^^^ The above line should NO LONGER be in your ~/.bash_profile file! ^^^ As this was part of my path, perhaps that caused the issue?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/quantopian/zipline/issues/2543?email_source=notifications&email_token=AAQOLRKK4KDLFS5FN2SRN5TQXBFSFA5CNFSM4IWYVGOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF7CF4Y#issuecomment-561914611, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQOLRK67XJEI6VBANUAQSTQXBFSFANCNFSM4IWYVGOA.