简体   繁体   中英

installation of talib in anaconda

I have a problem when trying to install ta-lib in the command prompt and got the following message in it. Any idea to solve the issue?

(base) C:\Users\LEGION>conda install -c quantopian ta-lib

Collecting package metadata (current_repodata.json): done Solving environment: / The environment is inconsistent, please check the package plan carefully The following packages are causing the inconsistency:

  • defaults/win-64::anaconda==2019.07=py37_0
    • defaults/win-64::numba==0.44.1=py37hf9181ef_0 failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: - Found conflicts. Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed

UnsatisfiableError: The following specifications were found \ to be incompatible with the existing python installation in your environment:

Specifications:

  • ta-lib -> python[version='2.7. |3.5. |>=3.5,<3.6.0a0']
  • ta-lib -> python[version='>=2.7,<2.8.0a0']

Your python: python=3.7

If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.

The following specifications were found to be incompatible with each other:

Package msgpack-python conflicts for:

ta-lib -> python=2.7 -> pip -> cachecontrol -> msgpack-python Package ca-certificates conflicts for: ta-lib -> python=2.7 -> ca-certificates python=3.7 -> openssl[version='>=1.1.1a,<1.1.2a'] -> ca-certificates Package pip conflicts for: ta-lib -> python=2.7 -> pip python=3.7 -> pip Package setuptools conflicts for: python=3.7 -> pip -> setuptools ta-lib -> python=2.7 -> pip -> setuptools Package certifi conflicts for: python=3.7 -> pip -> setuptools -> certifi[version='>=2016.09|>=2016.9.26'] ta-lib -> python=2.7 -> pip -> setuptools -> certifi[version='>=2016.09|>=2016.9.26|>=2017.4.17'] Package wheel conflicts for: python=3.7 -> pip -> wheel ta-lib -> python=2.7 -> pip -> wheel Package wincertstore conflicts for: python=3.7 -> pip -> setuptools -> wincertstore[version='>=0.2'] ta-lib -> python=2.7 -> pip -> setuptools -> wincertstore[version='>=0.2']

I have tried the following ones but no one works for me: I am using ANACONDA

conda install TA-Lib
pip install TA-Lib

If you are using Anaconda, then you can try:

conda install -c conda-forge ta-lib

That worked for me on 64-bit Windows.

The following works for Windows 7 and 10:

  1. Check the Python version you have installed by running the command in your Anaconda Prompt:

    python –version

  2. Check your Windows System architecture by right clicking and selecting Properties on the This PC or My Computer on File Explorer (My Python version is 3.7 and System type is 64-bit Operating System so I downloaded TA_Lib-0.4.18-cp37-cp37m-win_amd64.whl where cp37 is the Python version and amd64 is the Windows Operating System).

enter image description here

enter image description here

  1. Move this file to where you have your Python installed and run the following command in Anaconda Prompt:

    pip install TA_Lib-0.4.18-cp37-cp37m-win_amd64.whl

- Source

After many hours trying different things. I had to use the following unofficial recipe which was created specifically for Windows 10:

conda install -c masdeseiscaracteres ta-lib

Testing:

Install nose
pip install nose
Run tests
nosetests -v talib

If everything goes alright, the following is expected:

talib.test_abstract.test_pandas ... ok
talib.test_abstract.test_SMA ... ok
talib.test_abstract.test_STOCH ... ok
talib.test_abstract.test_doji_candle ... ok
talib.test_abstract.test_MAVP ... ok
talib.test_abstract.test_info ... ok
talib.test_abstract.test_input_names ... ok
talib.test_abstract.test_input_arrays ... ok
talib.test_abstract.test_parameters ... ok
talib.test_abstract.test_lookback ... ok
talib.test_func.test_talib_version ... ok
talib.test_func.test_num_functions ... ok
talib.test_func.test_input_lengths ... ok
talib.test_func.test_input_nans ... ok
talib.test_func.test_unstable_period ... ok
talib.test_func.test_MIN ... ok
talib.test_func.test_MAX ... ok
talib.test_func.test_MOM ... ok
talib.test_func.test_BBANDS ... ok
talib.test_func.test_DEMA ... ok
talib.test_func.test_EMAEMA ... ok
talib.test_func.test_CDL3BLACKCROWS ... ok
talib.test_func.test_RSI ... ok
talib.test_func.test_MAVP ... ok
talib.test_stream.test_streaming ... ok
talib.test_stream.test_CDL3BLACKCROWS ... ok

----------------------------------------------------------------------
Ran 26 tests in 0.131s

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM