When trying to run command "pip install -r requirements.txt", I receive the error message:
"Command errored out with exit status 1"
I think it is a version issue but I am not sure but the course makes me download version 3.9.5 of python and I think the requirements.txt fill requires either 3.7 or 3.6 to work. Please could you clarify this and what the solution to this problem is.
Thank you
Hi Avinash,
The Quantra environment uses python version 3.9.5. The requirements.txt file lists the python libraries which one would need for running the trading strategies. The libraries listed in the txt file have been checked and should work on python 3.9.5 easily, so a version issue should not be a problem.
Is it possible for you to send the entire error message. This would help understand what happened exactly. Sometimes this error could come if you don't have Microsoft Visual C++ 14 or above. Do send the error message and it would help clear things out.
Hi Rekhit,
Thank you so much for your help and I have put the full error message below (there were a lot of other errors too) and just for context, I am setting this all up on macbook.
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/envs/py39/bin/python /private/var/folders/sm/4fcpm7315vj8dbg1dzrbwk9h0000gn/T/pip-standalone-pip-nrbtch5i/env_pip.zip/pip install --ignore-installed --no-user --prefix /private/var/folders/sm/4fcpm7315vj8dbg1dzrbwk9h0000gn/T/pip-build-env-xfde3_zr/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i Simple index – setuptools wheel 'cython>=0.29.14' 'numpy==1.15.4; python_version=='"'"'3.6'"'"'' 'numpy==1.15.4; python_version=='"'"'3.7'"'"'' 'numpy==1.17.5; python_version>='"'"'3.8'"'"'' 'scipy>=1.2'
cwd: None
Complete output (2715 lines):
Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7"' don't match your environment
Collecting setuptools
Downloading setuptools-57.4.0-py3-none-any.whl (819 kB)
Collecting wheel
Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Collecting cython>=0.29.14
Using cached Cython-0.29.24-cp39-cp39-macosx_10_9_x86_64.whl (1.9 MB)
Collecting numpy==1.17.5
Using cached numpy-1.17.5.zip (6.4 MB)
Collecting scipy>=1.2
Using cached scipy-1.7.0-cp39-cp39-macosx_10_9_x86_64.whl (32.1 MB)
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/envs/py39/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/sm/4fcpm7315vj8dbg1dzrbwk9h0000gn/T/pip-install-o8jl8e2z/numpy_94d526c93fc44fdcb723a987e3b10d7f/setup.py'"'"'; file='"'"'/private/var/folders/sm/4fcpm7315vj8dbg1dzrbwk9h0000gn/T/pip-install-o8jl8e2z/numpy_94d526c93fc44fdcb723a987e3b10d7f/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/sm/4fcpm7315vj8dbg1dzrbwk9h0000gn/T/pip-wheel-z0t_zzfr
cwd: /private/var/folders/sm/4fcpm7315vj8dbg1dzrbwk9h0000gn/T/pip-install-o8jl8e2z/numpy_94d526c93fc44fdcb723a987e3b10d7f/
Complete output (2397 lines):
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/opt/anaconda3/envs/py39/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
blis_info:
customize UnixCCompiler
libraries blis not found in ['/opt/anaconda3/envs/py39/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/opt/anaconda3/envs/py39/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries tatlas not found in ['/opt/anaconda3/envs/py39/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_3_10_blas_info:
customize UnixCCompiler
libraries satlas not found in ['/opt/anaconda3/envs/py39/li
The error message continues on but this page is not big enough so if you suspect there are any other errors you would like me to look for and paste here, then please let me know.
Thank you again.
Hi Avinash,
Thanks for sending the error message. I feel that there was a conflict with versions already installed. Can you remove the existing environment and start afresh.
You can remove the environment by following the steps in this website: Managing environments — conda 4.6.1 documentation
You should also uninstall Anaconda and install it again. While installing Anaconda, please ensure that the Anaconda version is 64-bit. But do this only if your Mac is 64-bit.
A fresh install after removing the existing components should help solve your problem.
Hope this helps.