Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue running freqtrade command (buggy Accelerate backend) #4209

Closed
sherryxiao1988 opened this issue Jan 13, 2021 · 10 comments
Closed

Issue running freqtrade command (buggy Accelerate backend) #4209

sherryxiao1988 opened this issue Jan 13, 2021 · 10 comments
Labels
Install Problems with installation Question Questions - will be closed after some period of inactivity.

Comments

@sherryxiao1988
Copy link

Describe your environment

  • Operating system: 10.15.7
  • Python Version: 3.8.7
  • CCXT version: 1.39.79
  • Freqtrade Version: ____ error thrown when running freqtrade command

I can install everything by running the ./setup.sh --install script without anything error is thrown, however when running the command 'freqtrade --help", I got the following error:

Python(94927,0x1078d7dc0) malloc: can't allocate region
:*** mach_vm_map(size=18446744072360030208, flags: 100) failed (error code=3)
Python(94927,0x1078d7dc0) malloc: *** set a breakpoint in malloc_error_break to debug
init_dgelsd failed init
Traceback (most recent call last):
  File "/Users/sxiao/workspace/freqtrade/.env/bin/freqtrade", line 33, in <module>
    sys.exit(load_entry_point('freqtrade', 'console_scripts', 'freqtrade')())
  File "/Users/sxiao/workspace/freqtrade/.env/bin/freqtrade", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/sxiao/workspace/freqtrade/freqtrade/main.py", line 15, in <module>
    from freqtrade.commands import Arguments
  File "/Users/sxiao/workspace/freqtrade/freqtrade/commands/__init__.py", line 10, in <module>
    from freqtrade.commands.build_config_commands import start_new_config
  File "/Users/sxiao/workspace/freqtrade/freqtrade/commands/build_config_commands.py", line 9, in <module>
    from freqtrade.exchange import MAP_EXCHANGE_CHILDCLASS, available_exchanges
  File "/Users/sxiao/workspace/freqtrade/freqtrade/exchange/__init__.py", line 4, in <module>
    from freqtrade.exchange.exchange import Exchange
  File "/Users/sxiao/workspace/freqtrade/freqtrade/exchange/exchange.py", line 18, in <module>
    from pandas import DataFrame
  File "/Users/sxiao/workspace/freqtrade/.env/lib/python3.8/site-packages/pandas/__init__.py", line 11, in <module>
    __import__(dependency)
  File "/Users/sxiao/workspace/freqtrade/.env/lib/python3.8/site-packages/numpy/__init__.py", line 286, in <module>
    raise RuntimeError(msg)
RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy.
RankWarning: Polyfit may be poorly conditioned

I tried all methods suggested in this thread "numpy/numpy#15947" and also tried the manual installation steps listed https://www.freqtrade.io/en/latest/installation/. I also tried cleanup my python environments and tried with different python versions (3.7, 3.8 and 3.9). Still can't get rid of this issue.

Can anyone help?

Thanks!

@sherryxiao1988 sherryxiao1988 added the Question Questions - will be closed after some period of inactivity. label Jan 13, 2021
@xmatthias
Copy link
Member

Does numpy work independently of freqtrade?
so (with activated virtual environment), run python, and input the following two lines.

import numpy as np
np.__version__

If it doesn't then i'm afraid we'll not be able to help you and need to redirect you to the Numpy support channels.
The issue points to a problem with your installation, either a package is missing at install time (maybe openblas), or it's installed and shouldn't be "too much" ...
I do however have no experience / knowledge with macOS, so we're unable to support you here.

I know it's a dependency of freqtrade, but as a small, free open source project, we don't have the resources to help with generic python (numpy) installation problems.

@xmatthias xmatthias added the Install Problems with installation label Jan 14, 2021
@sherryxiao1988
Copy link
Author

Thanks for your response. It does work independently of freqtrade. Please see the attached image:
image

I tried to install it with openblas, however, it doesn't work. I also just upgraded my os to Big Sur with the hope this problem will be fixed with an OS update. Also didn't work for me.

@xmatthias
Copy link
Member

what about importing pandas (import pandas as pd)?

Did you try to reinstall the whole virtual environment? (rm -rf .env, ./setup.sh -i)?

As said, i got no experience with MacOS, so no clue what can be wrong.

@sherryxiao1988
Copy link
Author

pandas works fine as well. Yeah I already tried to reinstall the whole virtual environment. Still having the same issue.

I guess what I can do now is developing using Docker?

@xmatthias
Copy link
Member

Wait ...
i think you've got your environments messed up (not sure how or why ...).

your "np import" shows python 3.7.9 ...

but the errors in the log above show python 3.8.
So with python 3.7 it seems to work, while python 3.8 seems to show a problem.... which suggests that you've somehow got 2 different python versions (or at least 2 different virtual environments ...).

@sherryxiao1988
Copy link
Author

ah, haha actually no. When I had the first screenshot I was using python 3.8 and then I removed 3.8 and trying 3.7 again lol that's when I ran the np import. If I run freqtrade now, I got the error message from python 3.7.

image

@xmatthias
Copy link
Member

The import that's failing is a simple from pandas import DataFrame error.

This should either fail also standalone - or not at all - we're not doing anything to pandas (nor numpy) which would cause this.

@sherryxiao1988
Copy link
Author

So strange, it doesn't fall standalone
image

@xmatthias
Copy link
Member

xmatthias commented Jan 18, 2021

If you look at the following stackoverflow issue, you may get ideas about how to approach this.

I'm not a macos user myself - but this seems to be some weired macOS Python problem, so please don't expect much further help from here.

@sherryxiao1988
Copy link
Author

I will close this issue now, but I've tried all methods I can (including the stackoverflow link you referred). Devcontainer also doesn't work for me. I will probably try to develop it on my windows machine lol thanks for all the help so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Install Problems with installation Question Questions - will be closed after some period of inactivity.
Projects
None yet
Development

No branches or pull requests

2 participants