mhallsmoore / qstrader

QuantStart.com - QSTrader backtesting simulation engine.
https://www.quantstart.com/qstrader/
MIT License
2.88k stars 856 forks source link

Unable to install virtual environment using conda for qstrader dependencies #256

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi, I am trying to create a virtual environment using conda environment.yml using the requirements.txt file given here as a reference: https://github.com/mhallsmoore/qstrader/blob/master/requirements.txt

So, the conda file looks like:

channels:
dependencies:
  - decorator
  - ipython
  - ipywidgets
  - ipython-genutils
  - matplotlib
  - numpy
  - pandas
  - pandas_datareader
  - path.py
  - pexpect
  - pickleshare
  - ptyprocess
  - python-dateutil
  - pytz
  - requests_cache
  - scipy
  - simplegeneric
  - traitlets
  - seaborn>=0.7.0
  - click>=6.6
  - pyyaml>=3.11
  - munch>=2.0.4
  - multipledispatch>=0.4.8
  - pip:
    - "git+https://github.com/mhallsmoore/qstrader.git"

When I try to create the virtual environment for this using conda env create -f environment.yml , it fails with the error:

Solving environment: failed ResolvePackageNotFound:

  • requests_cache
    • ptyprocess
  • pandas_datareader
  • ipython-genutils

Is it ok to leave out these 4 dependencies (doing this creates the environment successfully) or are they mandatory? I am using anaconda 64-bit with python 3 on Windows 10.

ghost commented 6 years ago

Meanwhile, I was able to solve the issue by moving those dependencies under pip. So my environment.yml now looks like:

name: qstraderenv
channels:
dependencies:
  - decorator
  - ipython
  - ipywidgets
  - matplotlib
  - numpy
  - pandas
  - path.py
  - pexpect
  - pickleshare
  - python-dateutil
  - pytz
  - scipy
  - simplegeneric
  - traitlets
  - seaborn>=0.7.0
  - click>=6.6
  - pyyaml>=3.11
  - munch>=2.0.4
  - multipledispatch>=0.4.8
  - pip:
    - "git+https://github.com/mhallsmoore/qstrader.git"
    - ipython-genutils
    - pandas_datareader
    - requests_cache
    - ptyprocess

And it works great. Thanks!