facioquo / stock-indicators-python

Stock Indicators for Python. Maintained by @LeeDongGeon1996
https://python.StockIndicators.dev
Apache License 2.0
226 stars 38 forks source link

CLR error on import stock_indicators #309

Closed Tvax closed 1 year ago

Tvax commented 1 year ago

MacOS 13.3.1 - Python 3.11.3 - stock_indicators 1.0.1

import stock_indicators throws this error:

Exception has occurred: ImportError
fail to import clr.
Stock Indicators for Python has dependency on pythonnet, which uses CLR.
Check that you have CLR installed. It's currently using .NET6.
.NET:
    https://dotnet.microsoft.com/en-us/download/dotnet
RuntimeError: Can not determine dotnet root

The above exception was the direct cause of the following exception:

RuntimeError: Failed to create a .NET runtime (coreclr) using the
                parameters {'runtime_config': '/usr/local/lib/python3.11/site-packages/stock_indicators/_cslib/runtimeconfig.json'}

Python 3.10.11 works as excepted but not in a virtual environment.

Tvax commented 1 year ago

Installing via worked: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.408-macos-x64-installer Versions available on Homebrew don't work.