scrtlabs / catalyst

An Algorithmic Trading Library for Crypto-Assets in Python
http://enigma.co
Apache License 2.0
2.49k stars 723 forks source link

Catalyst can't be executed #529

Open nerd-lab opened 5 years ago

nerd-lab commented 5 years ago

Dear Catalyst Maintainers,

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

Environment

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

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

altcnews commented 5 years ago

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.

kudko commented 5 years ago

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.

neroniaky commented 5 years ago

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.

kudko commented 5 years ago

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
  4. Install numpy 1.16.0, as suggested above. pip install numpy==1.16.0
  5. 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.

aduriseti commented 5 years ago

@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

ElisaBee commented 4 years ago

@kudko It works! Thanks