背景
conda环境没有talib
pip instlal ta-lib报错
1 | error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2 |
尝试官网下载wheel
https://github.com/cgohlke/talib-build/releases
我的conda是3.12的python,选择win-amd64下载。
放进conda环境目录
C:\Users\Administrator\software\anaconda3\envs\lianghua\Scripts
打开 anaconda命令行,激活lianghua环境,安装命令
1 | pip install C:/Users/Administrator/software/anaconda3/envs/lianghua/Scripts/ta_lib-0.6.4-cp312-cp312-win_amd64.whl |
输出
1 | Processing c:\users\administrator\software\anaconda3\envs\lianghua\scripts\ta_lib-0.6.4-cp312-cp312-win_amd64.whl |
安装成功
测试import没问题