Skip to content
This repository was archived by the owner on Nov 26, 2022. It is now read-only.
This repository was archived by the owner on Nov 26, 2022. It is now read-only.

module compiled against API version 0xc but this version of numpy is 0xb #106

Closed
@Spugnam

Description

@Spugnam

Hi, I wasn't able to install catalyst.

Here's my environment info:

  • Operating System: macOS
  • Python Version: Python 3.6.3
  • Python Bitness: 64
  • How did you install Catalyst:
    I tried:
    pip install enigma-catalyst matplotlib

then:
pip install -r requirements.txt

and both gave me a similar error (below).

  • Python packages:
    aiodns==1.1.1
    aiohttp==2.3.6
    alembic==0.7.7
    async-timeout==2.0.0
    bcolz==0.12.1
    boto3==1.4.8
    botocore==1.8.15
    Bottleneck==1.0.0
    cchardet==2.1.1
    ccxt==1.10.283
    certifi==2017.11.5
    chardet==3.0.4
    click==4.0
    contextlib2==0.4.0
    cycler==0.10.0
    cyordereddict==0.2.2
    Cython==0.25.2
    decorator==4.0.0
    docutils==0.14
    empyrical==0.2.1
    enigma-catalyst==0.4.0
    idna==2.6
    intervaltree==2.1.0
    jmespath==0.9.3
    Logbook==0.12.5
    lru-dict==1.1.4
    Mako==1.0.1
    MarkupSafe==0.23
    matplotlib==2.1.1
    multidict==3.3.2
    multipledispatch==0.4.8
    networkx==1.9.1
    numexpr==2.6.1
    numpy==1.13.1
    pandas==0.19.2
    pandas-datareader==0.2.1
    patsy==0.4.0
    pycares==2.3.0
    pyparsing==2.2.0
    python-dateutil==2.4.2
    python-editor==1.0.3
    pytz==2016.4
    requests==2.9.1
    requests-file==1.4.1
    requests-ftp==0.3.1
    s3transfer==0.1.12
    scipy==0.17.1
    six==1.10.0
    sortedcontainers==1.4.4
    SQLAlchemy==1.0.8
    statsmodels==0.6.1
    tables==3.3.0
    toolz==0.8.2
    urllib3==1.22
    yarl==0.16.0

I tried to execute catalyst --version to check installation was successful and got:
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb Traceback (most recent call last): File "/Users/Quentin/Documents/Projects/Catalyst/catalyst-venv/bin/catalyst", line 7, in <module> from catalyst.__main__ import main File "/Users/Quentin/Documents/Projects/Catalyst/catalyst-venv/lib/python3.6/site-packages/catalyst/__init__.py", line 25, in <module> from .utils.run_algo import run_algorithm File "/Users/Quentin/Documents/Projects/Catalyst/catalyst-venv/lib/python3.6/site-packages/catalyst/utils/run_algo.py", line 13, in <module> from catalyst.data.bundles import load File "/Users/Quentin/Documents/Projects/Catalyst/catalyst-venv/lib/python3.6/site-packages/catalyst/data/bundles/__init__.py", line 2, in <module> from . import quandl # noqa File "/Users/Quentin/Documents/Projects/Catalyst/catalyst-venv/lib/python3.6/site-packages/catalyst/data/bundles/quandl.py", line 21, in <module> from catalyst.data.bundles.core import register_bundle File "/Users/Quentin/Documents/Projects/Catalyst/catalyst-venv/lib/python3.6/site-packages/catalyst/data/bundles/core.py", line 14, in <module> from ..us_equity_pricing import ( File "/Users/Quentin/Documents/Projects/Catalyst/catalyst-venv/lib/python3.6/site-packages/catalyst/data/us_equity_pricing.py", line 23, in <module> from bcolz import ( File "/Users/Quentin/Documents/Projects/Catalyst/catalyst-venv/lib/python3.6/site-packages/bcolz/__init__.py", line 55, in <module> from bcolz.carray_ext import ( ImportError: numpy.core.multiarray failed to import

I tried with numpy 1.13.3 (latest) and 1.13.1 (from requirements.txt) but nothing worked...

thanks

Activity

fredfortier

fredfortier commented on Dec 18, 2017

@fredfortier
Contributor
arsanjea

arsanjea commented on Dec 19, 2017

@arsanjea

We tested with python 2.7 and we are getting the exact same issue.

fredfortier

fredfortier commented on Dec 19, 2017

@fredfortier
Contributor
brandonclosson

brandonclosson commented on Dec 22, 2017

@brandonclosson

I had this issue with both bcolz and bottleneck importing from numpy. I believe for me it was an issue with both packages being installed with an incorrect version of numpy I had cached on my machine. I was able to resolve both by uninstalling them and running pip install with the --no-cache-dir option.

These are the commands I ran:

pip uninstall bcolz
pip install bcolz --no-cache-dir
pip uninstall bottleneck
pip install bottleneck --no-cache-dir

fredfortier

fredfortier commented on Dec 22, 2017

@fredfortier
Contributor
itsjaked

itsjaked commented on Dec 23, 2017

@itsjaked

I'm having a similar issue although not exactly the same, figured I'd post it here:

Traceback (most recent call last): File "/usr/local/bin/catalyst", line 7, in <module> from catalyst.__main__ import main File "/usr/local/lib/python2.7/site-packages/catalyst/__init__.py", line 25, in <module> from .utils.run_algo import run_algorithm File "/usr/local/lib/python2.7/site-packages/catalyst/utils/run_algo.py", line 15, in <module> from catalyst.exchange.factory import get_exchange File "/usr/local/lib/python2.7/site-packages/catalyst/exchange/factory.py", line 3, in <module> from catalyst.exchange.ccxt.ccxt_exchange import CCXT File "/usr/local/lib/python2.7/site-packages/catalyst/exchange/ccxt/ccxt_exchange.py", line 11, in <module> from catalyst.algorithm import MarketOrder File "/usr/local/lib/python2.7/site-packages/catalyst/algorithm.py", line 89, in <module> from catalyst.pipeline import Pipeline File "/usr/local/lib/python2.7/site-packages/catalyst/pipeline/__init__.py", line 4, in <module> from .classifiers import Classifier, CustomClassifier File "/usr/local/lib/python2.7/site-packages/catalyst/pipeline/classifiers/__init__.py", line 1, in <module> from .classifier import ( File "/usr/local/lib/python2.7/site-packages/catalyst/pipeline/classifiers/classifier.py", line 11, in <module> from catalyst.lib.labelarray import LabelArray File "/usr/local/lib/python2.7/site-packages/catalyst/lib/labelarray.py", line 30, in <module> from ._factorize import ( File "catalyst/lib/_factorize.pyx", line 10, in init catalyst.lib._factorize (catalyst/lib/_factorize.c:11047) File "__init__.pxd", line 989, in numpy.import_array (catalyst/lib/_factorize.c:10338) ImportError: numpy.core.multiarray failed to import

fredfortier

fredfortier commented on Dec 23, 2017

@fredfortier
Contributor
itsjaked

itsjaked commented on Dec 23, 2017

@itsjaked

Thanks for the quick response, but no change. I tried that earlier when I initially encountered the error. I'll keep playing with it to see if I can find a fix, but may just give up and set it up on Ubuntu.

fredfortier

fredfortier commented on Dec 23, 2017

@fredfortier
Contributor

Try sending me the output of this command if you can:

pip freeze --local

I'll diff it with mine. Which OS are you using now?

itsjaked

itsjaked commented on Dec 23, 2017

@itsjaked

Running macOS 10.13.1, and here you are:

alembic==0.9.6
asn1crypto==0.22.0
backports.functools-lru-cache==1.4
bcolz==0.12.1
boto3==1.5.6
botocore==1.8.20
Bottleneck==1.2.1
ccxt==1.10.456
certifi==2017.7.27.1
cffi==1.10.0
chardet==3.0.4
click==6.7
conda==4.3.30
contextlib2==0.5.5
cryptography==2.0.3
cycler==0.10.0
cyordereddict==1.0.0
Cython==0.27.3
decorator==4.1.2
docutils==0.14
empyrical==0.2.1
enigma-catalyst==0.4.0
enum34==1.1.6
futures==3.2.0
idna==2.6
intervaltree==2.1.0
ipaddress==1.0.18
jmespath==0.9.3
Logbook==1.1.0
lru-dict==1.1.6
Mako==1.0.7
MarkupSafe==1.0
matplotlib==2.1.1
multipledispatch==0.4.9
networkx==2.0
numexpr==2.6.4
numpy==1.13.1
pandas==0.19.2
pandas-datareader==0.5.0
patsy==0.4.1
pycosat==0.6.2
pycparser==2.18
pyOpenSSL==17.2.0
pyparsing==2.2.0
PySocks==1.6.7
python-dateutil==2.6.1
python-editor==1.0.3
pytz==2017.3
requests==2.18.4
requests-file==1.4.2
requests-ftp==0.3.1
ruamel-yaml==0.11.14
s3transfer==0.1.12
scipy==1.0.0
six==1.11.0
sortedcontainers==1.5.9
SQLAlchemy==1.1.15
statsmodels==0.8.0
subprocess32==3.2.7
tables==3.4.2
toolz==0.9.0
urllib3==1.22

brandonclosson

brandonclosson commented on Dec 23, 2017

@brandonclosson

@itsjaked as I referenced in my previous post with other packages, if you run pip uninstall catalyst and then pip install catalyst --no-cache-dir, I believe your error will be resolved

itsjaked

itsjaked commented on Dec 23, 2017

@itsjaked

@brandonclosson Awesome, thanks, issue has been resolved. I did try that previously, but most likely had another dependency issue at that time.

wnklb

wnklb commented on Dec 29, 2017

@wnklb

@fredfortier @brandonclosson I've tried --no-cache-dir and various package version on several packages (bcolz, bottleneck, numpy, catalyst) through python2/3 without any success. However running pip install enigma-catalyst matplotlib --no-cache-dir in the first place, fixed this. Thanks!

8 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mdgart@fredfortier@itsjaked@brandonclosson@waniz

        Issue actions

          module compiled against API version 0xc but this version of numpy is 0xb · Issue #106 · scrtlabs/catalyst