Closed dss010101 closed 1 year ago
Probably you need a wheel built for 3.11.
Alternatively, you can go rename the _ta_lib.dll file (it probably has 3.10 in the name in your case and I guess isn’t found).
On Mon, Oct 31, 2022 at 2:59 PM msingh00 @.***> wrote:
After upgrading to python 3.11, i started getting this error in the title on the line that imports talib. I am running on windows 10 xamd64 and i used this wheel named 'TA_Lib‑0.4.24‑cp310‑cp310‑win_amd64.whl' found here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib
I did do a pip upgrade. I have uninstalled and tried re-installing, but that failed. had to change the named of the file to TA_Lib‑0.4.24‑cp311‑cp311‑win_amd64.whl as it seems the latest version of pip did not have a tag for cp310:
Compatible tags: 39
cp311-cp311-win_amd64
cp311-abi3-win_amd64
cp311-none-win_amd64
cp310-abi3-win_amd64
..
py311-none-win_amd64
py3-none-win_amd64
py310-none-win_amd64
py39-none-win_amd64
...
cp311-none-any
py311-none-any
py3-none-any
py310-none-any
After doing that i was able to successfully install, but still getting the same error: No module named 'talib._ta_lib'
Any suggestions on how to resolve this?
— Reply to this email directly, view it on GitHub https://github.com/mrjbq7/ta-lib/issues/559, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5A25A3NNN5S4TDAMUJDWGA6KHANCNFSM6AAAAAARTQE53Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thanks. i've followed the instructions here: https://pypi.org/project/TA-Lib/ and did just that. But the instructions does not tell me what to do after running nmake on windows:
WINDOWS
Download [ta-lib-0.4.0-msvc.zip](http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-msvc.zip) and unzip to C:\ta-lib.
This is a 32-bit binary release. If you want to use 64-bit Python, you will need to build a 64-bit version of the library. Some unofficial (and unsupported) instructions for building on 64-bit Windows 10, here for reference:
Download and Unzip ta-lib-0.4.0-msvc.zip
Move the Unzipped Folder ta-lib to C:\
Download and Install Visual Studio Community 2015
Remember to Select [Visual C++] Feature
Build TA-Lib Library
From Windows Start Menu, Start [VS2015 x64 Native Tools Command Prompt]
Move to C:\ta-lib\c\make\cdr\win32\msvc
Build the Library nmake
What exactly is it making here and where are the output files from this make? How do i now install this into my environment?
That’s the underlying TA-Lib C library. It is the main dependency and required to be in C:\ta-lib (or other directory specified by TA_LIBRARY_PATH).
After you have it built for 64-bit, then “python3.11 -m pip install ta-lib” should work.
On Mon, Oct 31, 2022 at 3:15 PM msingh00 @.***> wrote:
Thanks. i've followed the instructions here: https://pypi.org/project/TA-Lib/ and did just that. But the instructions does not tell me what to do after running nmake on windows:
WINDOWS Download ta-lib-0.4.0-msvc.zip and unzip to C:\ta-lib.
This is a 32-bit binary release. If you want to use 64-bit Python, you will need to build a 64-bit version of the library. Some unofficial (and unsupported) instructions for building on 64-bit Windows 10, here for reference:
Download and Unzip ta-lib-0.4.0-msvc.zip Move the Unzipped Folder ta-lib to C:\ Download and Install Visual Studio Community 2015 Remember to Select [Visual C++] Feature Build TA-Lib Library From Windows Start Menu, Start [VS2015 x64 Native Tools Command Prompt] Move to C:\ta-lib\c\make\cdr\win32\msvc Build the Library nmake
What exactly is it making here and where are the output files from this make? How do i now install this into my environment?
— Reply to this email directly, view it on GitHub https://github.com/mrjbq7/ta-lib/issues/559#issuecomment-1297754766, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5A67ZPG56BAKCFZLYALWGBAGTANCNFSM6AAAAAARTQE53Y . You are receiving this because you commented.Message ID: @.***>
that worked, thank you!
i moved it over the C:\ as i had it in different location the first time i did a make.
Would like to understand it a bit better...what exactly does the make do?
How does pip know where to find the files/dependencies it needs to use to either build or install in this case? does the make set that TA_LIBRARY_PATH, which pip looks for in this case?
The setup.py
looks in default locations, see this:
https://github.com/mrjbq7/ta-lib/blob/master/setup.py#L46
And the following couple of lines let you override with a custom path to the TA-Lib C library.
ah...got it. thanks again
Awesome!
Running into a similar issue here, Windows 10, Python 3.11.
I downloaded and unzipped that file to my C:/
directory (so it's now in C:/ta-lib/
), and ran the nmake
, then when I run python -m pip install ta-lib
or pip install ta-lib
I get the following traceback:
PS C:\> python -m pip install ta-lib
Collecting ta-lib
Using cached TA-Lib-0.4.25.tar.gz (271 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in c:\users\chalu\appdata\local\programs\python\python311\lib\site-packages (from ta-lib) (1.23.4)
Building wheels for collected packages: ta-lib
Building wheel for ta-lib (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for ta-lib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [519 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\talib
copying talib\abstract.py -> build\lib.win-amd64-cpython-311\talib
copying talib\deprecated.py -> build\lib.win-amd64-cpython-311\talib
copying talib\stream.py -> build\lib.win-amd64-cpython-311\talib
copying talib\test_abstract.py -> build\lib.win-amd64-cpython-311\talib
copying talib\test_data.py -> build\lib.win-amd64-cpython-311\talib
copying talib\test_func.py -> build\lib.win-amd64-cpython-311\talib
copying talib\test_pandas.py -> build\lib.win-amd64-cpython-311\talib
copying talib\test_polars.py -> build\lib.win-amd64-cpython-311\talib
copying talib\test_stream.py -> build\lib.win-amd64-cpython-311\talib
copying talib\__init__.py -> build\lib.win-amd64-cpython-311\talib
running build_ext
building 'talib._ta_lib' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\talib
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic:\ta-lib\c\include -IC:\Users\chalu\AppData\Local\Temp\pip-build-env-am8lh1gy\normal\Lib\site-packages\numpy\core\include -IC:\Users\chalu\AppData\Local\Programs\Python\Python311\include -IC:\Users\chalu\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tctalib/_ta_lib.c /Fobuild\temp.win-amd64-cpython-311\Release\talib/_ta_lib.obj
_ta_lib.c
C:\Users\chalu\AppData\Local\Temp\pip-build-env-am8lh1gy\normal\Lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
talib/_ta_lib.c(7052): warning C4146: unary minus operator applied to unsigned type, result still unsigned
...
talib/_ta_lib.c(65359): warning C4146: unary minus operator applied to unsigned type, result still unsigned
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\ta-lib\c\lib /LIBPATH:C:\Users\chalu\AppData\Local\Programs\Python\Python311\libs /LIBPATH:C:\Users\chalu\AppData\Local\Programs\Python\Python311 /LIBPATH:C:\Users\chalu\AppData\Local\Programs\Python\Python311\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64" ta_libc_cdr.lib /EXPORT:PyInit__ta_lib build\temp.win-amd64-cpython-311\Release\talib/_ta_lib.obj /OUT:build\lib.win-amd64-cpython-311\talib\_ta_lib.cp311-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-311\Release\talib\_ta_lib.cp311-win_amd64.lib
Creating library build\temp.win-amd64-cpython-311\Release\talib\_ta_lib.cp311-win_amd64.lib and object build\temp.win-amd64-cpython-311\Release\talib\_ta_lib.cp311-win_amd64.exp
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLBREAKAWAY_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLEVENINGSTAR
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLSEPARATINGLINES_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLDRAGONFLYDOJI
_ta_lib.obj : error LNK2001: unresolved external symbol TA_SetOptInputParamReal
...
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLRISEFALL3METHODS_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_GetVersionString
build\lib.win-amd64-cpython-311\talib\_ta_lib.cp311-win_amd64.pyd : fatal error LNK1120: 339 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120
[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
Failed to build ta-lib
ERROR: Could not build wheels for ta-lib, which is required to install pyproject.toml-based projects
Quite the mess of course. One thing that might be worth mentioning is that I'm using VS 2019 for the command prompt, not sure if that's relevant. Also I still have Python 3.10 installed, which might be screwing things up a bit, but python
in my command prompt is run from version 3.11
.
What else can I try?
That error indicates it can’t find the TA-Lib underlying C library (C:/ta-lib).
Perhaps it wasn’t built properly? Did you follow the directions in the README for 64-bit?
On Tue, Nov 8, 2022 at 6:13 PM windowshopr @.***> wrote:
Running into a similar issue here, Windows 10, Python 3.11.
I downloaded and unzipped that file to my C:/ directory (so it's now in C:/ta-lib/), and ran the nmake, then when I run python -m pip install ta-lib or pip install ta-lib I get the following traceback:
PS C:> python -m pip install ta-lib
Collecting ta-lib
Using cached TA-Lib-0.4.25.tar.gz (271 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in c:\users\chalu\appdata\local\programs\python\python311\lib\site-packages (from ta-lib) (1.23.4)
Building wheels for collected packages: ta-lib
Building wheel for ta-lib (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for ta-lib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [519 lines of output]
running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\talib copying talib\abstract.py -> build\lib.win-amd64-cpython-311\talib copying talib\deprecated.py -> build\lib.win-amd64-cpython-311\talib copying talib\stream.py -> build\lib.win-amd64-cpython-311\talib copying talib\test_abstract.py -> build\lib.win-amd64-cpython-311\talib copying talib\test_data.py -> build\lib.win-amd64-cpython-311\talib copying talib\test_func.py -> build\lib.win-amd64-cpython-311\talib copying talib\test_pandas.py -> build\lib.win-amd64-cpython-311\talib copying talib\test_polars.py -> build\lib.win-amd64-cpython-311\talib copying talib\test_stream.py -> build\lib.win-amd64-cpython-311\talib copying talib\__init__.py -> build\lib.win-amd64-cpython-311\talib running build_ext building 'talib._ta_lib' extension creating build\temp.win-amd64-cpython-311 creating build\temp.win-amd64-cpython-311\Release creating build\temp.win-amd64-cpython-311\Release\talib "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic:\ta-lib\c\include -IC:\Users\chalu\AppData\Local\Temp\pip-build-env-am8lh1gy\normal\Lib\site-packages\numpy\core\include -IC:\Users\chalu\AppData\Local\Programs\Python\Python311\include -IC:\Users\chalu\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tctalib/_ta_lib.c /Fobuild\temp.win-amd64-cpython-311\Release\talib/_ta_lib.obj _ta_lib.c C:\Users\chalu\AppData\Local\Temp\pip-build-env-am8lh1gy\normal\Lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION talib/_ta_lib.c(7052): warning C4146: unary minus operator applied to unsigned type, result still unsigned ... talib/_ta_lib.c(65359): warning C4146: unary minus operator applied to unsigned type, result still unsigned "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\ta-lib\c\lib /LIBPATH:C:\Users\chalu\AppData\Local\Programs\Python\Python311\libs /LIBPATH:C:\Users\chalu\AppData\Local\Programs\Python\Python311 /LIBPATH:C:\Users\chalu\AppData\Local\Programs\Python\Python311\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64" ta_libc_cdr.lib /EXPORT:PyInit__ta_lib build\temp.win-amd64-cpython-311\Release\talib/_ta_lib.obj /OUT:build\lib.win-amd64-cpython-311\talib\_ta_lib.cp311-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-311\Release\talib\_ta_lib.cp311-win_amd64.lib Creating library build\temp.win-amd64-cpython-311\Release\talib\_ta_lib.cp311-win_amd64.lib and object build\temp.win-amd64-cpython-311\Release\talib\_ta_lib.cp311-win_amd64.exp _ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLBREAKAWAY_Lookback _ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLEVENINGSTAR _ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLSEPARATINGLINES_Lookback _ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLDRAGONFLYDOJI _ta_lib.obj : error LNK2001: unresolved external symbol TA_SetOptInputParamReal ... _ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLRISEFALL3METHODS_Lookback _ta_lib.obj : error LNK2001: unresolved external symbol TA_GetVersionString build\lib.win-amd64-cpython-311\talib\_ta_lib.cp311-win_amd64.pyd : fatal error LNK1120: 339 unresolved externals error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120 [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
Failed to build ta-lib
ERROR: Could not build wheels for ta-lib, which is required to install pyproject.toml-based projects
Quite the mess of course. One thing that might be worth mentioning is that I'm using VS 2019 for the command prompt, not sure if that's relevant. Also I still have Python 3.10 installed, which might be screwing things up a bit, but python in my command prompt is run from version 3.11.
What else can I try?
— Reply to this email directly, view it on GitHub https://github.com/mrjbq7/ta-lib/issues/559#issuecomment-1308104610, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5A6YIPAMRXE2SE3HLZLWHMCE3ANCNFSM6AAAAAARTQE53Y . You are receiving this because you modified the open/close state.Message ID: @.***>
Without uninstalling and re-installing an old version of VS to get the C++ build library, I'm going to try the steps in this post. What I'm attempting now is to install (basically) every VS package in the C++ Desktop Development as I feel like I'm missing one of them necessary for the build. Once I have all that installed, I'll try the steps again and report back.
It shouldn’t require an old Visual Studio.
On Tue, Nov 8, 2022 at 6:24 PM windowshopr @.***> wrote:
Without uninstalling and re-installing an old version of VS to get the C++ build library, I'm going to try the steps in this post https://gist.github.com/mdalvi/e08115381992e42b43cad861dfe417d2?permalink_comment_id=3672815#gistcomment-3672815. What I'm attempting now is to install (basically) every VS package in the C++ Desktop Development as I feel like I'm missing one of them necessary for the build. Once I have all that installed, I'll try the steps again and report back.
— Reply to this email directly, view it on GitHub https://github.com/mrjbq7/ta-lib/issues/559#issuecomment-1308112854, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5A36MOGTOUVX7OJ5NPLWHMDN3ANCNFSM6AAAAAARTQE53Y . You are receiving this because you modified the open/close state.Message ID: @.***>
Well the instructions say Download and Install Visual Studio Community 2015
which I would assume are just old instructions and 2019 would work, but god forbid that isn't the case and here's me NOT following the correct instructions lol
I think latest Visual studio will work.
Maybe we should update those instructions !
On Tue, Nov 8, 2022 at 6:34 PM windowshopr @.***> wrote:
Well the instructions say Download and Install Visual Studio Community 2015 which I would assume are just old instructions and 2019 would work, but god forbid that isn't the case and here's me NOT following the correct instructions lol
— Reply to this email directly, view it on GitHub https://github.com/mrjbq7/ta-lib/issues/559#issuecomment-1308118771, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5A67ZZ75SJ7POEVUBELWHMESJANCNFSM6AAAAAARTQE53Y . You are receiving this because you modified the open/close state.Message ID: @.***>
Success!
Steps taken:
cd C:\ta-lib\c\make\cdr\win32\msvc
nmake
pip install ta-lib
Thanks!!
Wooooo! Thanks!On Nov 8, 2022, at 7:04 PM, windowshopr @.***> wrote: Success! Steps taken:
Ensured all C++ packages from the C++ Desktop Development were installed for VS 2019 through the VS Installer > Modify(?) window Installed the latest update for VS 2019 Deleted the old C:/ta-lib folder Restarted the computer Moved the Unzipped Folder ta-lib to C:\ (from the original zip file) Opened x64 Native Tools Command Prompt for VS 2019 Ran cd C:\ta-lib\c\make\cdr\win32\msvc Ran nmake Ran pip install ta-lib Success!
Thanks!!
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>
After upgrading to python 3.11, i started getting the error in the title on the line that imports talib. I am running on windows 10 xamd64 and i used this wheel named 'TA_Lib‑0.4.24‑cp310‑cp310‑win_amd64.whl' found here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib
I did do a pip upgrade. I have uninstalled and tried re-installing, but that failed. had to change the named of the file to TA_Lib‑0.4.24‑cp311‑cp311‑win_amd64.whl as it seems the latest version of pip did not have a tag for 'cp310-cp310..':
After doing that i was able to successfully install, but still getting the same error:
No module named 'talib._ta_lib'
Any suggestions on how to resolve this?