mhallsmoore / qstrader

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

Error when installing qstrader on osx with anaconda #284

Closed 3dvg closed 4 years ago

3dvg commented 4 years ago

The setup:

This is what I did:

activate qstrader
conda install scipy
conda install wget
pip install git+https://github.com/mhallsmoore/qstrader.git
pip install -r https://raw.githubusercontent.com/mhallsmoore/qstrader/master/requirements.txt

The error: Happens in the last step when : pip install -r https://raw.githubusercontent.com/mhallsmoore/qstrader/master/requirements.txt error : Building wheels for collected packages: numpy, pandas, scipy

Building wheels for collected packages: numpy, pandas, scipy
  Building wheel for numpy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/87/b8dvqxmj6x9g2gkygz8htslc0000gn/T/pip-install-8ijioix6/numpy/setup.py'"'"'; __file__='"'"'/private/var/folders/87/b8dvqxmj6x9g2gkygz8htslc0000gn/T/pip-install-8ijioix6/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/87/b8dvqxmj6x9g2gkygz8htslc0000gn/T/pip-wheel-g_jq9746 --python-tag cp37
       cwd: /private/var/folders/87/b8dvqxmj6x9g2gkygz8htslc0000gn/T/pip-install-8ijioix6/numpy/
  Complete output (4066 lines):
  Running from numpy source directory.
  blas_opt_info:
  blas_mkl_info:
    libraries mkl,vml,guide not found in ['/opt/anaconda3/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

... error output is huge, 4000 lines

Then I scroll down and there's the error when building wheel for pandas:

 ----------------------------------------
  ERROR: Failed building wheel for numpy
  Running setup.py clean for numpy
  Building wheel for pandas (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/87/b8dvqxmj6x9g2gkygz8htslc0000gn/T/pip-install-8ijioix6/pandas/setup.py'"'"'; __file__='"'"'/private/var/folders/87/b8dvqxmj6x9g2gkygz8htslc0000gn/T/pip-install-8ijioix6/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/87/b8dvqxmj6x9g2gkygz8htslc0000gn/T/pip-wheel-agueinr2 --python-tag cp37
       cwd: /private/var/folders/87/b8dvqxmj6x9g2gkygz8htslc0000gn/T/pip-install-8ijioix6/pandas/
  Complete output (793 lines):
  running bdist_wheel

And another 793 lines of error.

...Another error when building wheel for scipy.

And finally this one:

Failed to build numpy pandas scipy
ERROR: statsmodels 0.10.1 has requirement numpy>=1.11, but you'll have numpy 1.10.4 which is incompatible.
ERROR: statsmodels 0.10.1 has requirement pandas>=0.19, but you'll have pandas 0.18.1 which is incompatible.
ERROR: statsmodels 0.10.1 has requirement scipy>=0.18, but you'll have scipy 0.17.0 which is incompatible.
ERROR: scikit-learn 0.21.3 has requirement numpy>=1.11.0, but you'll have numpy 1.10.4 which is incompatible.
ERROR: scikit-image 0.15.0 has requirement matplotlib!=3.0.0,>=2.0.0, but you'll have matplotlib 1.5.3 which is incompatible.
ERROR: notebook 6.0.1 has requirement traitlets>=4.2.1, but you'll have traitlets 4.1.0 which is incompatible.
ERROR: nbconvert 5.6.0 has requirement traitlets>=4.2, but you'll have traitlets 4.1.0 which is incompatible.
ERROR: ipywidgets 5.1.5 has requirement traitlets>=4.2.1, but you'll have traitlets 4.1.0 which is incompatible.
ERROR: ipykernel 5.1.2 has requirement ipython>=5.0.0, but you'll have ipython 4.2.0 which is incompatible.
ERROR: astropy 3.2.2 has requirement numpy>=1.13, but you'll have numpy 1.10.4 which is incompatible.
ERROR: anaconda-client 1.7.2 has requirement python-dateutil>=2.6.1, but you'll have python-dateutil 2.4.2 which is incompatible.
Installing collected packages: ipython-genutils, traitlets, ptyprocess, pexpect, ipython, ipywidgets, python-dateutil, numpy, pytz, matplotlib, pandas, requests-file, pandas-datareader, requests-cache, scipy, munch, enum34
  Found existing installation: ipython-genutils 0.2.0
ERROR: Cannot uninstall 'ipython-genutils'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

I obv must have done something wrong but I really have no idea, I just tried to follow the installation steps.

Any help would be greatly appreciated.

onahkenneth commented 4 years ago

@3dvg The requirements.txt file contains old module versions, you are better off using python 2.7 instead of 3.7

mhallsmoore commented 4 years ago

Hi @3dvg and @onahkenneth,

Thank you for submitting the bug issue. We have just updated the requirements.txt to reflect modern versions of the Python package dependencies. The continuous integration via Travis now checks against Python 3.5, 3.6 and 3.7.

Please let us know if you have any further trouble. I'll keep the issue open for now.

Regards,

Mike.

3dvg commented 4 years ago

@mhallsmoore working like a charm now!

Thanks,

Ed.