I am able to run the algorithms in the Algorithm.Python folder of the Lean repo using Docker and making the necessary modifications in Launcher/config.json file. This is the command I used:

docker run --rm \ -v /tmp:/Results \ -v $(pwd)/Data:/Data \ -v $(pwd)/Launcher/config.json:/Lean/config.json \ -v $(pwd)/Algorithm.Python/:/Algorithm.Python \ quantconnect/lean:latest --data-folder /Data --results-destination-folder /Results --config /Lean/config.json

I would like to be able to develop algorithms in Python with the help of a Python REPL. I thought I can get one by running:

docker run --rm \ -v /tmp:/Results \ -v $(pwd)/Data:/Data \ -v $(pwd)/Launcher/config.json:/Lean/config.json \ -v $(pwd)/Algorithm.Python/:/Algorithm.Python \ -it \ --entrypoint python \ quantconnect/lean:latest

This launches a Python REPL but running commands like:

from clr import AddReference

gives:

34296_1591917081.jpg 

so I don't think I am using the right Python interpreter inside the container.

How do I call the right Python interpreter inside the Docker container? I know Python but am totally new to the .NET and Mono environment.

 

Author