VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 21
声望: 0

通过install.bat很多库安装失败怎么解决?提示如下:

Microsoft Windows [版本 10.0.19045.3208]
(c) Microsoft Corporation。保留所有权利。

C:\WINDOWS\system32>cd D:\Trade\vn-py-master

C:\WINDOWS\system32>cd d:
D:\Trade\vn-py-master

C:\WINDOWS\system32>d:

D:\Trade\vn-py-master>c:

C:\Windows\System32>d:

D:\Trade\vn-py-master>install.bat

D:\Trade\vn-py-master>python -m pip install --upgrade pip wheel
Requirement already satisfied: pip in c:\users\lcc\anaconda3\lib\site-packages (22.3.1)
Collecting pip
Downloading pip-23.2.1-py3-none-any.whl (2.1 MB)
---------------------------------------- 2.1/2.1 MB 38.5 kB/s eta 0:00:00
Requirement already satisfied: wheel in c:\users\lcc\anaconda3\lib\site-packages (0.38.4)
Collecting wheel
Downloading wheel-0.41.1-py3-none-any.whl (64 kB)
---------------------------------------- 64.8/64.8 kB 35.6 kB/s eta 0:00:00
Installing collected packages: wheel, pip
Attempting uninstall: wheel
Found existing installation: wheel 0.38.4
Uninstalling wheel-0.38.4:
Successfully uninstalled wheel-0.38.4
Attempting uninstall: pip
Found existing installation: pip 22.3.1
Uninstalling pip-22.3.1:
Successfully uninstalled pip-22.3.1
Successfully installed pip-23.2.1 wheel-0.41.1

D:\Trade\vn-py-master>python -m pip install --extra-index-url http://139.196.190.180 --trusted-host 139.196.190.180 TA_Lib==0.4.24
Looking in indexes: https://pypi.org/simple, http://139.196.190.180
Collecting TA_Lib==0.4.24
Downloading https://139.196.190.180/packages/TA-Lib-0.4.24.tar.gz (269 kB)
---------------------------------------- 269.4/269.4 kB 221.1 kB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\lcc\anaconda3\lib\site-packages (from TA_Lib==0.4.24) (1.23.5)
Building wheels for collected packages: TA_Lib
Building wheel for TA_Lib (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
C:\Users\lcc\AppData\Local\Temp\pip-install-k8d2pw39\ta-lib_5f699de20faa469ca137f99e1b9e7d49\setup.py:77: UserWarning: Cannot find ta-lib library, installation may fail.
warnings.warn('Cannot find ta-lib library, installation may fail.')
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\talib
copying talib\abstract.py -> build\lib.win-amd64-cpython-310\talib
copying talib\deprecated.py -> build\lib.win-amd64-cpython-310\talib
copying talib\stream.py -> build\lib.win-amd64-cpython-310\talib
copying talib\test_abstract.py -> build\lib.win-amd64-cpython-310\talib
copying talib\test_data.py -> build\lib.win-amd64-cpython-310\talib
copying talib\test_func.py -> build\lib.win-amd64-cpython-310\talib
copying talib\test_pandas.py -> build\lib.win-amd64-cpython-310\talib
copying talib\test_polars.py -> build\lib.win-amd64-cpython-310\talib
copying talib\test_stream.py -> build\lib.win-amd64-cpython-310\talib
copying talib__init__.py -> build\lib.win-amd64-cpython-310\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
Running setup.py clean for TA_Lib
Failed to build TA_Lib
ERROR: Could not build wheels for TA_Lib, which is required to install pyproject.toml-based projects

D:\Trade\vn-py-master>python -m pip install -r requirements.txt
Ignoring backports.zoneinfo: markers 'python_version < "3.9"' don't match your environment
Collecting tzlocal==4.2 (from -r requirements.txt (line 1))
Downloading tzlocal-4.2-py3-none-any.whl (19 kB)
Collecting PySide6==6.3.0 (from -r requirements.txt (line 2))
Downloading PySide6-6.3.0-cp36-abi3-win_amd64.whl (66 kB)
---------------------------------------- 66.8/66.8 kB 226.0 kB/s eta 0:00:00
Collecting pyqtgraph==0.12.4 (from -r requirements.txt (line 3))
Downloading pyqtgraph-0.12.4-py3-none-any.whl (995 kB)
---------------------------------------- 995.8/995.8 kB 33.7 kB/s eta 0:00:00
Collecting qdarkstyle==3.1 (from -r requirements.txt (line 4))
Downloading QDarkStyle-3.1-py2.py3-none-any.whl (870 kB)
---------------------------------------- 870.2/870.2 kB 41.0 kB/s eta 0:00:00
Collecting numpy==1.23.1 (from -r requirements.txt (line 5))
Downloading numpy-1.23.1-cp310-cp310-win_amd64.whl (14.6 MB)
----------------------- ---------------- 8.4/14.6 MB 30.8 kB/s eta 0:03:22

Member
avatar
加入于:
帖子: 1472
声望: 105

这个脚本是针对Python 3.10的,检查下版本是否匹配

Member
avatar
加入于:
帖子: 4709
声望: 287

可以看下是否安装了visual studio

Member
avatar
加入于:
帖子: 21
声望: 0

MTF wrote:

这个脚本是针对Python 3.10的,检查下版本是否匹配
电脑上用anaconda安装的是Python 3.11.3,需要再安装一个Python 3.10吗

Member
avatar
加入于:
帖子: 21
声望: 0

xiaohe wrote:

可以看下是否安装了visual studio

已经安装了visual studio

Member
avatar
加入于:
帖子: 4709
声望: 287

云儿的天空 wrote:

MTF wrote:

这个脚本是针对Python 3.10的,检查下版本是否匹配
电脑上用anaconda安装的是Python 3.11.3,需要再安装一个Python 3.10吗
是的

Member
加入于:
帖子: 4
声望: 0

就是talib的安装问题,和我一样

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】