update windows install documentation

This commit is contained in:
Matthias 2018-06-08 11:23:00 +02:00 committed by GitHub
parent c4af66e312
commit 43d19790ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,6 @@ To understand how to set up the bot please read the [Bot Configuration](https://
- [Setup Config and virtual env](#setup-config-and-virtual-env) - [Setup Config and virtual env](#setup-config-and-virtual-env)
* [Windows](#windows) * [Windows](#windows)
<!-- /TOC --> <!-- /TOC -->
------ ------
@ -35,7 +34,9 @@ usage:
``` ```
### --install ### --install
This script will install everything you need to run the bot: This script will install everything you need to run the bot:
* Mandatory software as: `Python3`, `ta-lib`, `wget` * Mandatory software as: `Python3`, `ta-lib`, `wget`
* Setup your virtualenv * Setup your virtualenv
* Configure your `config.json` file * Configure your `config.json` file
@ -43,12 +44,15 @@ This script will install everything you need to run the bot:
This script is a combination of `install script` `--reset`, `--config` This script is a combination of `install script` `--reset`, `--config`
### --update ### --update
Update parameter will pull the last version of your current branch and update your virtualenv. Update parameter will pull the last version of your current branch and update your virtualenv.
### --reset ### --reset
Reset parameter will hard reset your branch (only if you are on `master` or `develop`) and recreate your virtualenv. Reset parameter will hard reset your branch (only if you are on `master` or `develop`) and recreate your virtualenv.
### --config ### --config
Config parameter is a `config.json` configurator. This script will ask you questions to setup your bot and create your `config.json`. Config parameter is a `config.json` configurator. This script will ask you questions to setup your bot and create your `config.json`.
------ ------
@ -63,7 +67,6 @@ Start by downloading Docker for your platform:
Once you have Docker installed, simply create the config file (e.g. `config.json`) and then create a Docker image for `freqtrade` using the Dockerfile in this repo. Once you have Docker installed, simply create the config file (e.g. `config.json`) and then create a Docker image for `freqtrade` using the Dockerfile in this repo.
### 1. Prepare the Bot ### 1. Prepare the Bot
#### 1.1. Clone the git repository #### 1.1. Clone the git repository
@ -95,16 +98,17 @@ cp -n config.json.example config.json
#### 1.5. Create your database file *(optional - the bot will create it if it is missing)* #### 1.5. Create your database file *(optional - the bot will create it if it is missing)*
Production Production
```bash ```bash
touch tradesv3.sqlite touch tradesv3.sqlite
```` ````
Dry-Run Dry-Run
```bash ```bash
touch tradesv3.dryrun.sqlite touch tradesv3.dryrun.sqlite
``` ```
### 2. Build the Docker image ### 2. Build the Docker image
```bash ```bash
@ -114,7 +118,6 @@ docker build -t freqtrade .
For security reasons, your configuration file will not be included in the image, you will need to bind mount it. It is also advised to bind mount an SQLite database file (see the "5. Run a restartable docker image" section) to keep it between updates. For security reasons, your configuration file will not be included in the image, you will need to bind mount it. It is also advised to bind mount an SQLite database file (see the "5. Run a restartable docker image" section) to keep it between updates.
### 3. Verify the Docker image ### 3. Verify the Docker image
After the build process you can verify that the image was created with: After the build process you can verify that the image was created with:
@ -123,7 +126,6 @@ After the build process you can verify that the image was created with:
docker images docker images
``` ```
### 4. Run the Docker image ### 4. Run the Docker image
You can run a one-off container that is immediately deleted upon exiting with the following command (`config.json` must be in the current working directory): You can run a one-off container that is immediately deleted upon exiting with the following command (`config.json` must be in the current working directory):
@ -137,11 +139,11 @@ There is known issue in OSX Docker versions after 17.09.1, whereby /etc/localtim
```bash ```bash
docker run --rm -e TZ=`ls -la /etc/localtime | cut -d/ -f8-9` -v `pwd`/config.json:/freqtrade/config.json -it freqtrade docker run --rm -e TZ=`ls -la /etc/localtime | cut -d/ -f8-9` -v `pwd`/config.json:/freqtrade/config.json -it freqtrade
``` ```
More information on this docker issue and work-around can be read here: https://github.com/docker/for-mac/issues/2396
More information on this docker issue and work-around can be read [here](https://github.com/docker/for-mac/issues/2396)
In this example, the database will be created inside the docker instance and will be lost when you will refresh your image. In this example, the database will be created inside the docker instance and will be lost when you will refresh your image.
### 5. Run a restartable docker image ### 5. Run a restartable docker image
To run a restartable instance in the background (feel free to place your configuration and database files wherever it feels comfortable on your filesystem). To run a restartable instance in the background (feel free to place your configuration and database files wherever it feels comfortable on your filesystem).
@ -164,6 +166,7 @@ docker run -d \
-v ~/.freqtrade/tradesv3.sqlite:/freqtrade/tradesv3.sqlite \ -v ~/.freqtrade/tradesv3.sqlite:/freqtrade/tradesv3.sqlite \
freqtrade --db-url sqlite:///tradesv3.sqlite freqtrade --db-url sqlite:///tradesv3.sqlite
``` ```
NOTE: db-url defaults to `sqlite:///tradesv3.sqlite` but it defaults to `sqlite://` if `dry_run=True` is being used. NOTE: db-url defaults to `sqlite:///tradesv3.sqlite` but it defaults to `sqlite://` if `dry_run=True` is being used.
To override this behaviour use a custom db-url value: i.e.: `--db-url sqlite:///tradesv3.dryrun.sqlite` To override this behaviour use a custom db-url value: i.e.: `--db-url sqlite:///tradesv3.dryrun.sqlite`
@ -190,13 +193,13 @@ We've included/collected install instructions for Ubuntu 16.04, MacOS, and Windo
### Requirements ### Requirements
Click each one for install guide: Click each one for install guide:
* [Python 3.6.x](http://docs.python-guide.org/en/latest/starting/installation/), note the bot was not tested on Python >= 3.7.x * [Python 3.6.x](http://docs.python-guide.org/en/latest/starting/installation/), note the bot was not tested on Python >= 3.7.x
* [pip](https://pip.pypa.io/en/stable/installing/) * [pip](https://pip.pypa.io/en/stable/installing/)
* [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) * [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [virtualenv](https://virtualenv.pypa.io/en/stable/installation/) (Recommended) * [virtualenv](https://virtualenv.pypa.io/en/stable/installation/) (Recommended)
* [TA-Lib](https://mrjbq7.github.io/ta-lib/install.html) * [TA-Lib](https://mrjbq7.github.io/ta-lib/install.html)
### Linux - Ubuntu 16.04 ### Linux - Ubuntu 16.04
#### 1. Install Python 3.6, Git, and wget #### 1. Install Python 3.6, Git, and wget
@ -240,17 +243,12 @@ Clone the git repository:
git clone https://github.com/freqtrade/freqtrade.git git clone https://github.com/freqtrade/freqtrade.git
``` ```
Optionally checkout the develop branch:
```bash
git checkout develop
```
#### 5. Configure `freqtrade` as a `systemd` service #### 5. Configure `freqtrade` as a `systemd` service
From the freqtrade repo... copy `freqtrade.service` to your systemd user directory (usually `~/.config/systemd/user`) and update `WorkingDirectory` and `ExecStart` to match your setup. From the freqtrade repo... copy `freqtrade.service` to your systemd user directory (usually `~/.config/systemd/user`) and update `WorkingDirectory` and `ExecStart` to match your setup.
After that you can start the daemon with: After that you can start the daemon with:
```bash ```bash
systemctl --user start freqtrade systemctl --user start freqtrade
``` ```
@ -261,7 +259,6 @@ For this to be persistent (run when user is logged out) you'll need to enable `l
sudo loginctl enable-linger "$USER" sudo loginctl enable-linger "$USER"
``` ```
### MacOS ### MacOS
#### 1. Install Python 3.6, git, wget and ta-lib #### 1. Install Python 3.6, git, wget and ta-lib
@ -296,7 +293,6 @@ Optionally checkout the develop branch:
git checkout develop git checkout develop
``` ```
### Setup Config and virtual env ### Setup Config and virtual env
#### 1. Initialize the configuration #### 1. Initialize the configuration
@ -308,7 +304,6 @@ cp config.json.example config.json
> *To edit the config please refer to [Bot Configuration](https://github.com/freqtrade/freqtrade/blob/develop/docs/configuration.md).* > *To edit the config please refer to [Bot Configuration](https://github.com/freqtrade/freqtrade/blob/develop/docs/configuration.md).*
#### 2. Setup your Python virtual environment (virtualenv) #### 2. Setup your Python virtual environment (virtualenv)
```bash ```bash
@ -331,27 +326,41 @@ python3.6 ./freqtrade/main.py -c config.json
## Windows ## Windows
We recommend that Windows users use [Docker](#docker) as this will work We recommend that Windows users use [Docker](#docker) as this will work much easier and smoother (also more secure).
much easier and smoother (also more secure).
### Install freqtrade If that is not possible, try using the Windows Linux subsystem (WSL) - for which the Ubuntu instructions should work.
If that is not available on your system, feel free to try the instructions below, which led to success for some.
### Install freqtrade manually
#### Clone the git repository
```bash
git clone https://github.com/freqtrade/freqtrade.git
```
copy paste `config.json` to ``\path\freqtrade-develop\freqtrade` copy paste `config.json` to ``\path\freqtrade-develop\freqtrade`
#### install ta-lib
Install ta-lib according to the [ta-lib documentation](https://github.com/mrjbq7/ta-lib#windows).
As compiling from source on windows has heavy dependencies (requires a partial visual studio installation), there is also a repository of inofficial precompiled windows Wheels [here](https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib), which needs to be downloaded and installed using `pip install TA_Lib0.4.17cp36cp36mwin32.whl` (make sure to use the version matching your python version)
```cmd ```cmd
>cd \path\freqtrade-develop >cd \path\freqtrade-develop
>python -m venv .env >python -m venv .env
>cd .env\Scripts >cd .env\Scripts
>activate.bat >activate.bat
>cd \path\freqtrade-develop >cd \path\freqtrade-develop
REM optionally install ta-lib from wheel
REM >pip install TA_Lib0.4.17cp36cp36mwin32.whl
>pip install -r requirements.txt >pip install -r requirements.txt
>pip install -e . >pip install -e .
>cd freqtrade >python freqtrade\main.py
>python main.py
``` ```
> Thanks [Owdr](https://github.com/Owdr) for the commands. Source: [Issue #222](https://github.com/freqtrade/freqtrade/issues/222) > Thanks [Owdr](https://github.com/Owdr) for the commands. Source: [Issue #222](https://github.com/freqtrade/freqtrade/issues/222)
Now you have an environment ready, the next step is Now you have an environment ready, the next step is
[Bot Configuration](https://github.com/freqtrade/freqtrade/blob/develop/docs/configuration.md)... [Bot Configuration](https://github.com/freqtrade/freqtrade/blob/develop/docs/configuration.md)...