catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

Catalyst can't be executed

Open nerd-lab opened this issue 6 years ago • 6 comments

Dear Catalyst Maintainers,

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

Environment

  • Operating System: Linux hp 4.19.12-arch1-1-ARCH #1 SMP PREEMPT Fri Dec 21 13:56:54 UTC 2018 x86_64 GNU/Linux
  • Python Version: Python 3.6.4 :: Anaconda, Inc.
  • Python Bitness: 64 Bit
  • How did you install Catalyst: conda env create -f python3.6-environment.yml python=3.6
  • Python packages:
packages in environment at /home/j/.conda/envs/catalyst:
Name                    Version                   Build  Channel
aiodns                    1.1.1                     <pip>
aiohttp                   3.0.1                     <pip>
alembic                   0.9.7                     <pip>
async-timeout             2.0.0                     <pip>
attrdict                  2.0.0                     <pip>
attrs                     17.4.0                    <pip>
attrs                     18.2.0                     py_0    conda-forge
backcall                  0.1.0                      py_0    conda-forge
bcolz                     1.2.1                     <pip>
blas                      1.1                    openblas    conda-forge
bleach                    3.0.2                      py_1    conda-forge
boto3                     1.5.27                    <pip>
botocore                  1.8.41                    <pip>
Bottleneck                1.2.1                     <pip>
ca-certificates           2017.08.26           h1d4fec5_0  
cchardet                  2.1.1                     <pip>
ccxt                      1.17.94                   <pip>
certifi                   2018.1.18                py36_0    conda-forge
chardet                   3.0.4                     <pip>
click                     6.7                       <pip>
contextlib2               0.5.5                     <pip>
cycler                    0.10.0                     py_1    conda-forge
cyordereddict             1.0.0                     <pip>
Cython                    0.27.3                    <pip>
cytoolz                   0.9.0                     <pip>
dbus                      1.13.0               h3a4f0e9_0    conda-forge
decorator                 4.3.0                      py_0    conda-forge
docutils                  0.14                      <pip>
empyrical                 0.2.1                     <pip>
enigma-catalyst           0.5.21                    <pip>
entrypoints               0.2.3                 py36_1002    conda-forge
eth-abi                   1.1.1                     <pip>
eth-account               0.2.2                     <pip>
eth-hash                  0.1.3                     <pip>
eth-keyfile               0.5.1                     <pip>
eth-keys                  0.2.0b3                   <pip>
eth-rlp                   0.1.2                     <pip>
eth-utils                 1.0.3                     <pip>
expat                     2.2.5                hfc679d8_2    conda-forge
fontconfig                2.13.0               hd36ec8e_5    conda-forge
freetype                  2.8.1                hfa320df_1    conda-forge
glib                      2.53.6               h5d9569c_2  
gmp                       6.1.2                hfc679d8_0    conda-forge
gst-plugins-base          1.12.4               h33fb286_0  
gstreamer                 1.12.4               hb53b477_0  
hexbytes                  0.1.0                     <pip>
icu                       58.2                 hfc679d8_0    conda-forge
idna                      2.6                       <pip>
idna-ssl                  1.0.0                     <pip>
intel-openmp              2018.0.0                      8  
intervaltree              2.1.0                     <pip>
ipykernel                 5.1.0           py36h24bf2e0_1001    conda-forge
ipython                   6.4.0                    py36_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.4.2                      py_0    conda-forge
jedi                      0.13.2                py36_1000    conda-forge
jinja2                    2.10                       py_1    conda-forge
jmespath                  0.9.3                     <pip>
jpeg                      9c                   h470a237_1    conda-forge
jsonschema                3.0.0a3               py36_1000    conda-forge
jupyter                   1.0.0                      py_1    conda-forge
jupyter-contrib-core      0.3.3                     <pip>
jupyter-nbextensions-configurator 0.4.0                     <pip>
jupyter_client            5.2.4                      py_0    conda-forge
jupyter_console           5.2.0                    py36_1    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
kiwisolver                1.0.1            py36h2d50403_2    conda-forge
libedit                   3.1.20170329         haf1bffa_1    conda-forge
libffi                    3.2.1                hfc679d8_5    conda-forge
libgcc-ng                 7.2.0                hdf63c60_3    conda-forge
libgfortran               3.0.0                         1    conda-forge
libiconv                  1.15                 h470a237_3    conda-forge
libpng                    1.6.34               ha92aebf_2    conda-forge
libsodium                 1.0.16               h470a237_1    conda-forge
libstdcxx-ng              7.2.0                hdf63c60_3    conda-forge
libuuid                   2.32.1               h470a237_2    conda-forge
libxcb                    1.13                 h470a237_2    conda-forge
libxml2                   2.9.8                h422b904_2    conda-forge
Logbook                   1.2.1                     <pip>
lru-dict                  1.1.6                     <pip>
lxml                      4.1.1                     <pip>
Mako                      1.0.7                     <pip>
MarkupSafe                1.0                       <pip>
markupsafe                1.1.0            py36h470a237_0    conda-forge
matplotlib                2.2.2                    py36_1    conda-forge
mistune                   0.8.4            py36h470a237_0    conda-forge
mkl                       2018.0.1             h19d6760_4  
multidict                 4.1.0                     <pip>
multipledispatch          0.4.9                     <pip>
nbconvert                 5.3.1                      py_1    conda-forge
nbformat                  4.4.0                      py_1    conda-forge
ncurses                   6.1                  hfc679d8_2    conda-forge
networkx                  2.1                       <pip>
notebook                  5.7.4                 py36_1000    conda-forge
numexpr                   2.6.4                     <pip>
numpy                     1.14.0          py36_blas_openblas_200  [blas_openblas]  conda-forge
openblas                  0.2.20                        8    conda-forge
openssl                   1.0.2n                        0    conda-forge
pandas                    0.19.2                    <pip>
pandas-datareader         0.6.0                     <pip>
pandoc                    2.5                           0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
parsimonious              0.8.0                     <pip>
parso                     0.3.1                      py_0    conda-forge
patsy                     0.5.0                     <pip>
pcre                      8.41                 hfc679d8_3    conda-forge
pexpect                   4.6.0                 py36_1000    conda-forge
pickleshare               0.7.5                 py36_1000    conda-forge
pip                       9.0.1                    py36_1    conda-forge
prometheus_client         0.5.0                      py_0    conda-forge
prompt_toolkit            1.0.15                     py_1    conda-forge
pthread-stubs             0.4                  h470a237_1    conda-forge
ptyprocess                0.6.0                 py36_1000    conda-forge
pycares                   2.3.0                     <pip>
pycryptodome              3.6.1                     <pip>
pygments                  2.3.1                      py_0    conda-forge
pyparsing                 2.3.0                      py_0    conda-forge
pyqt                      5.6.0            py36h8210e8a_8    conda-forge
pyrsistent                0.14.8           py36h470a237_0    conda-forge
pysha3                    1.0.2                     <pip>
python                    3.6.4                hc3d631a_3  
python-dateutil           2.7.5                      py_0    conda-forge
python-editor             1.0.3                     <pip>
pytz                      2016.4                    <pip>
pytz                      2018.7                     py_0    conda-forge
PyYAML                    3.13                      <pip>
pyzmq                     17.1.2           py36hae99301_1    conda-forge
qt                        5.6.2               hd25b39d_14  
qtconsole                 4.4.3                      py_0    conda-forge
readline                  7.0                  haf1bffa_1    conda-forge
redo                      2.0.1                     <pip>
requests                  2.20.1                    <pip>
requests-file             1.4.3                     <pip>
requests-ftp              0.3.1                     <pip>
requests-toolbelt         0.8.0                     <pip>
rlp                       0.6.0                     <pip>
s3transfer                0.1.12                    <pip>
scipy                     1.0.0           py36_blas_openblas_201  [blas_openblas]  conda-forge
send2trash                1.5.0                      py_0    conda-forge
setuptools                38.4.0                   py36_0    conda-forge
setuptools                40.6.3                    <pip>
simplegeneric             0.8.1                      py_1    conda-forge
sip                       4.18.1           py36hfc679d8_0    conda-forge
six                       1.12.0                py36_1000    conda-forge
sortedcontainers          1.5.9                     <pip>
SQLAlchemy                1.2.2                     <pip>
sqlite                    3.22.0               h1bed415_0  
statsmodels               0.8.0                     <pip>
tables                    3.4.2                     <pip>
terminado                 0.8.1                 py36_1001    conda-forge
testpath                  0.4.2                 py36_1000    conda-forge
tk                        8.6.7                         0    conda-forge
toolz                     0.9.0                     <pip>
tornado                   5.1.1            py36h470a237_0    conda-forge
traitlets                 4.3.2                 py36_1000    conda-forge
urllib3                   1.22                      <pip>
virtualenv                15.2.0                    <pip>
wcwidth                   0.1.7                      py_1    conda-forge
web3                      4.4.1                     <pip>
webencodings              0.5.1                      py_1    conda-forge
websockets                5.0                       <pip>
wheel                     0.30.0                   py36_2    conda-forge
widgetsnbextension        3.4.2                 py36_1000    conda-forge
wrapt                     1.10.11                   <pip>
xorg-libxau               1.0.8                h470a237_6    conda-forge
xorg-libxdmcp             1.1.2                h470a237_7    conda-forge
xz                        5.2.3                         0    conda-forge
yarl                      1.1.0                     <pip>
zeromq                    4.2.5                hfc679d8_6    conda-forge
zlib                      1.2.11               h470a237_3    conda-forge

Now that you know a little about me, let me tell you about the issue I am having: when I try to execute any command with catalyst in the conda environment it throws following error (catalyst --version is just an example, also happens with catalyst ingest-exchange)

Description of Issue

  • What did you expect to happen? Print the version of catalyst
  • What happened instead?
(catalyst) [j@hp:Dokumente/catalyst]$ catalyst --version                                                                                                                                              (12-29 18:19)
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
Traceback (most recent call last):
  File "/home/j/.conda/envs/catalyst/bin/catalyst", line 7, in <module>
    from catalyst.__main__ import main
  File "/home/j/.conda/envs/catalyst/lib/python3.6/site-packages/catalyst/__init__.py", line 20, in <module>
    from . import data
  File "/home/j/.conda/envs/catalyst/lib/python3.6/site-packages/catalyst/data/__init__.py", line 1, in <module>
    from . import loader
  File "/home/j/.conda/envs/catalyst/lib/python3.6/site-packages/catalyst/data/loader.py", line 26, in <module>
    from catalyst.utils.calendars import get_calendar
  File "/home/j/.conda/envs/catalyst/lib/python3.6/site-packages/catalyst/utils/calendars/__init__.py", line 16, in <module>
    from .trading_calendar import TradingCalendar
  File "/home/j/.conda/envs/catalyst/lib/python3.6/site-packages/catalyst/utils/calendars/trading_calendar.py", line 30, in <module>
    from catalyst.utils.calendars._calendar_helpers import (
  File ".eggs/Cython-0.29.2-py3.6-linux-x86_64.egg/Cython/Includes/numpy/__init__.pxd", line 918, in init catalyst.utils.calendars._calendar_helpers
ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject

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

Reproduction Steps

  1. conda install with given .yml file
  2. execute any catalyst command

What steps have you taken to resolve this already?

Reinstalling the environment and conda. Happens with conda and miniconda alike

Since the issuer of #525 doesn't answer I opened this new issue

Sincerely, Johannes

nerd-lab avatar Dec 29 '18 17:12 nerd-lab

hi, try to re install it from the beginning, i was done by that.

$ pip uninstall enigma-catalyst $ pip install enigma-catalyst

if it possible, also try to install the requirements one by one, yes it's a pain but...it's working for me.

wish you luck.

altcnews avatar Jan 11 '19 08:01 altcnews

hi, try to re install it from the beginning, i was done by that.

$ pip uninstall enigma-catalyst $ pip install enigma-catalyst

if it possible, also try to install the requirements one by one, yes it's a pain but...it's working for me.

wish you luck.

Hi. Could you please clarify what do you mean by "install the requirements one by one"? I have Python 3.6.8 :: Anaconda, Inc.. I tried installing catalyst via conda env create -f python3.6-environment.yml, it failed. Installing catalyst through pip gives me the exact same issue as the OP has. Do you have any other suggestions?

I tried with different version of python already 3.6.5, 3.6.8, also tried both ways - via conda and via pip - nothing works. I also tried uninstalling all Python instances, then installing Python 3.6.8 via anaconda and it still throwing me the same error.

kudko avatar Jan 22 '19 21:01 kudko

Upgrading numpy to 1.16.0 fixed this problem for me, which is suggested here: https://github.com/scikit-learn-contrib/hdbscan/issues/272. Unfortunately this breaks the lock file because numpy == 1.14.0 is required by catalyst.

neroniaky avatar Feb 11 '19 02:02 neroniaky

Upgrading numpy to 1.16.0 fixed this problem for me, which is suggested here: scikit-learn-contrib/hdbscan#272. Unfortunately this breaks the lock file because numpy == 1.14.0 is required by catalyst.

Thank you! This did the trick on Mac OS Mojave. Surprisingly, I didn't have to do install numpy 1.16.0 on Mac OS Sierra (tried it on a different mac). Ultimately, the successful installation process was as follows:

  1. Download and install the following package to get Python 3 from Miniconda repo (Doc section on their web site seems to be down): Miniconda3-4.5.1-MacOSX-x86_64.pkg
  2. If there is an existing catalyst environment, we need to make sure we remove it first: conda env remove --name catalyst
  3. Now we can create a new clean catalyst enevironmet and activate it
conda create --name catalyst python=3.6 scipy zlib
source activate catalyst
  1. Install numpy 1.16.0, as suggested above. pip install numpy==1.16.0
  2. Install catalyst pip install enigma-catalyst matplotlib --ignore-installed

To make sure Catalyst has been properly installed, run: which catalyst If a path to your catalyst environment is returned, you're good.

kudko avatar Feb 11 '19 09:02 kudko

@kudko has a good solution - but as of right now it installs a copy of numpy for both pip and conda - and only works if python will prefer pip versions of packages to conda versions of packages

I think a better long term change would involve modifying the default .yml file used for the recommended install step

Simply change numpy version from 1.14.0 to 1.16.0 (or a higher version if you want and it gives you no errors) as I've done in the attached file. Note: I had to change the extension to .txt to upload, but it should work fine if you remove that suffix and use .yml instead. python3.6-environment.txt

I also submitted a PR/file change proposal

aduriseti avatar Jun 25 '19 22:06 aduriseti

@kudko It works! Thanks

ElisaBee avatar Feb 14 '20 08:02 ElisaBee