Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows install bug #3523

Closed
liuhean opened this issue Mar 26, 2024 · 1 comment
Closed

windows install bug #3523

liuhean opened this issue Mar 26, 2024 · 1 comment

Comments

@liuhean
Copy link

liuhean commented Mar 26, 2024

环境

  • 操作系统: 如Windows 10
  • Python版本: 如Python3.9
  • VeighNa版本: 3.9.1

Issue类型

三选一:Bug

预期程序行为

pip install -r requirements.txt

实际程序行为

Collecting ta-lib==0.4.24
Using cached TA-Lib-0.4.24.tar.gz (269 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: numpy in d:\code\githubdes\vnpy\venv\lib\site-packages (from ta-lib==0.4.24) (1.26.4)
Building wheels for collected packages: ta-lib
Building wheel for ta-lib (setup.py): started
Building wheel for ta-lib (setup.py): finished with status 'error'
Running setup.py clean for ta-lib
Failed to build ta-lib

error: subprocess-exited-with-error

python setup.py bdist_wheel did not run successfully.
exit code: 1

[31 lines of output]
C:\Users\liuhean\AppData\Local\Temp\pip-install-zkg7cjzy\ta-lib_73264b312fa64d6696c1ed6a2f701172\setup.py:77: UserWarning: Cannot find ta-lib library, installation may fail.
warnings.warn('Cannot find ta-lib library, installation may fail.')
D:\code\githubDes\vnpy\venv\lib\site-packages\setuptools_init_.py:81: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

      ********************************************************************************
      Requirements should be satisfied by a PEP 517 installer.
      If you are using pip, you can try `pip install --use-pep517`.
      ********************************************************************************

!!
dist.fetch_build_eggs(dist.setup_requires)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\talib
copying talib\abstract.py -> build\lib.win-amd64-cpython-39\talib
copying talib\deprecated.py -> build\lib.win-amd64-cpython-39\talib
copying talib\stream.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_abstract.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_data.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_func.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_pandas.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_polars.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_stream.py -> build\lib.win-amd64-cpython-39\talib
copying talib_init_.py -> build\lib.win-amd64-cpython-39\talib
running build_ext
building 'talib._ta_lib' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for ta-lib
ERROR: Could not build wheels for ta-lib, which is required to install pyproject.toml-based projects

重现步骤

pip install -r requirements.txt

image

始终无法安装ta-lib,导致整个项目跑不起来

针对Bug类型Issue,请提供具体重现步骤以及报错截图

@vnpy
Copy link
Owner

vnpy commented Mar 26, 2024

推荐使用Python 3.10 + install.bat

如果必须使用Python 3.9,可以通过该命令安装ta-lib

pip install ta-lib --index=https://pypi.vnpy.com

@vnpy vnpy closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants