From d007ac4b96b3bf34f7e55a07ee53b0f3680e0b19 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 15 Aug 2018 08:37:20 +0200 Subject: [PATCH] check version explicitly, use "python" in venv --- freqtrade/strategy/__init__.py | 3 ++- setup.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/strategy/__init__.py b/freqtrade/strategy/__init__.py index 49b0c45c0..38a110bd7 100644 --- a/freqtrade/strategy/__init__.py +++ b/freqtrade/strategy/__init__.py @@ -1,4 +1,5 @@ import logging +import sys from copy import deepcopy from freqtrade.strategy.interface import IStrategy @@ -20,7 +21,7 @@ def import_strategy(strategy: IStrategy, config: dict) -> IStrategy: # Delete '_abc_impl' from dict as deepcopy fails on 3.7 with # `TypeError: can't pickle _abc_data objects`` # This will only apply to python 3.7 - if '_abc_impl' in comb: + if sys.version_info.major == 3 and sys.version_info.minor == 7 and '_abc_impl' in comb: del comb['_abc_impl'] attr = deepcopy(comb) diff --git a/setup.sh b/setup.sh index 557bcdd12..bd58edbee 100755 --- a/setup.sh +++ b/setup.sh @@ -211,7 +211,7 @@ function install () { echo "-------------------------" echo "Run the bot" echo "-------------------------" - echo "You can now use the bot by executing 'source .env/bin/activate; ${PYTHON} freqtrade/main.py'." + echo "You can now use the bot by executing 'source .env/bin/activate; python freqtrade/main.py'." } function plot () {