facioquo / stock-indicators-python

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

Error ModuleNotFoundError: No module named 'Skender' in Python 3.11 #357

Closed Mats1978 closed 3 months ago

Mats1978 commented 3 months ago

I want to use Stock-Indicators and installed it with pip install stock_indicators, which worked fine.

If I now want to do

import from stock_indicators import indicators

in Python I get the following error:

ModuleNotFoundError: No module named 'Skender'

I have to use Python 3.11 - is this the problem (it says Python 3.8 required)

Thanks, M

DaveSkender commented 3 months ago

Be sure to a) install the .NET SDK and b) install with pip install stock-indicators. You’d said you ran pip install stock_indicators which may not work. ref: installation and setup

Mats1978 commented 3 months ago

Thanks Dave.

Exactly, already did this (_was just a typo sorry):

Name: stock-indicators

Version: 1.2.1

Summary: Stock Indicators for Python. Send in historical price quotes and get back desired technical indicators such as Stochastic RSI, Average True Range, Parabolic SAR, etc. Nothing more.

Home-page:

Author: Dave Skender

Author-email:

License: Apache 2.0

Location: C:\Users\mathi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages

Requires: pythonnet, typing-extensions

Required-by:

And .net SDK: dotnet --list-sdks

6.0.420 [C:\Program Files\dotnet\sdk]

8.0.203 [C:\Program Files\dotnet\sdk]

I’m very thankful for other ideas.

Best, Mathias

Von: Dave Skender @.> Gesendet: Freitag, 22. März 2024 08:29 An: DaveSkender/Stock.Indicators.Python @.> Cc: Mats1978 @.>; Author @.> Betreff: Re: [DaveSkender/Stock.Indicators.Python] Error ModuleNotFoundError: No module named 'Skender' in Python 3.11 (Issue #357)

Be sure to a) install the .NET SDK and b) install with pip install stock-indicators. You’d said you ran pip install stock_indicators which may not work. ref: installation and setup https://python.stockindicators.dev/guide/#installation-and-setup

— Reply to this email directly, view it on GitHub https://github.com/DaveSkender/Stock.Indicators.Python/issues/357#issuecomment-2014503963 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANHFH5G5WKQ74KKMDAIAF7TYZPMVTAVCNFSM6AAAAABE77SCGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJUGUYDGOJWGM . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ANHFH5BBIHIXQFAA72SIZI3YZPMVTA5CNFSM6AAAAABE77SCGKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTYCLSBW.gif Message ID: @. @.> >

DaveSkender commented 3 months ago

It's difficult for me to help since I can't see exactly what you're doing or how your system is setup. Take a look at this working example to see if it helps you: example usage on ReplIt

Mats1978 commented 3 months ago

Thanks.

I’m using a fresh Windows 11 installation

Python 3.11

.Net SDK installed

Your example code already stops at the import:

from stock_indicators import indicators

File "C:\Users\mathi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\stock_indicators\indicators__init__.py", line 3, in

from stock_indicators import _cslib

File "C:\Users\mathi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\stock_indicators_cslib__init__.py", line 36, in

from Skender.Stock.Indicators import CandleProperties as CsCandleProperties

ModuleNotFoundError: No module named 'Skender'

I used stock-indicators in the past on a Windows 10 PC with Python 3.8 and it worked fine.

Thx,

M

Von: Dave Skender @.> Gesendet: Freitag, 22. März 2024 17:03 An: DaveSkender/Stock.Indicators.Python @.> Cc: Mats1978 @.>; Author @.> Betreff: Re: [DaveSkender/Stock.Indicators.Python] Error ModuleNotFoundError: No module named 'Skender' in Python 3.11 (Issue #357)

It's difficult for me to help since I can't see exactly what you're doing or how your system is setup. Take a look at this working example to see if it helps you: @.***/Stock-Indicators-for-Python-Williams-Fractal> example usage on ReplIt

— Reply to this email directly, https://github.com/DaveSkender/Stock.Indicators.Python/issues/357#issuecomment-2015411345 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/ANHFH5EFD7JNQNKPHR2XZODYZRI2ZAVCNFSM6AAAAABE77SCGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJVGQYTCMZUGU unsubscribe. You are receiving this because you authored the thread. https://github.com/notifications/beacon/ANHFH5EOLOK2L5D6L5MWLR3YZRI2ZA5CNFSM6AAAAABE77SCGKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTYEC6JC.gif Message ID: < @.> @.>

DaveSkender commented 3 months ago

must be something odd with your install, try pip install -r requirements.txt

Mats1978 commented 3 months ago

All looks ok:

C:\Users\mathi\AppData\Local\Programs\Python\Python312\Lib\site-packages\stock_indicators>pip install -r requirements.txt Requirement already satisfied: pythonnet>=3.0.0 in c:\users\mathi\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 2)) (3.0.3) Requirement already satisfied: typing_extensions>=4.0.0 in c:\users\mathi\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 3)) (4.10.0) Requirement already satisfied: clr-loader<0.3.0,>=0.2.6 in c:\users\mathi\appdata\local\programs\python\python312\lib\site-packages (from pythonnet>=3.0.0->-r requirements.txt (line 2)) (0.2.6) Requirement already satisfied: cffi>=1.13 in c:\users\mathi\appdata\local\programs\python\python312\lib\site-packages (from clr-loader<0.3.0,>=0.2.6->pythonnet>=3.0.0->-r requirements.txt (line 2)) (1.16.0) Requirement already satisfied: pycparser in c:\users\mathi\appdata\local\programs\python\python312\lib\site-packages (from cffi>=1.13->clr-loader<0.3.0,>=0.2.6->pythonnet>=3.0.0->-r requirements.txt (line 2)) (2.22)

I still have to use stock indicators on my old windows laptop with Win10/Python 3.7.7 (Anaconda)/.NET SDK 7.0

on the new one with Win11/Python 3.12 (not conda)/.Net 8.0 it does not work.

Maybe the same issue as this one here? https://github.com/DaveSkender/Stock.Indicators/discussions/1162

Any other ideas?

Thanks, M

DaveSkender commented 3 months ago

Coincidentally I’ve just setup a new Windows 11 laptop and will try to repro. I know it works, it’s just a matter of finding the missing piece of the puzzle.

We’ll take the opportunity to update setup docs and/or provide better error output. Your feedback along the way would be much appreciated. Thanks for your contribution so far, helpful.

DaveSkender commented 3 months ago

Here's the exact steps I took on a new Windows 11 laptop to get setup and to run the library: QuickStart for Stock Indicators for Python

Mats1978 commented 3 months ago

Hi

Thank you very much for this information.

It's really useful. I actually did it the same way, but probably a difference somewhere with the SDK.

Have now uninstalled .Net and used your link + extensions.

And now it works 😊.

Thanks for your help and the instructions!

Best, M

Von: Dave Skender @.> Gesendet: Montag, 1. April 2024 16:35 An: DaveSkender/Stock.Indicators.Python @.> Cc: Mats1978 @.>; Author @.> Betreff: Re: [DaveSkender/Stock.Indicators.Python] Error ModuleNotFoundError: No module named 'Skender' in Python 3.11 (Issue #357)

Here's the exact steps I took on a new Windows 11 laptop to get setup and to run the library: https://github.com/DaveSkender/Stock.Indicators.Python.Quickstart/#readme QuickStart for Stock Indicators for Python

— Reply to this email directly, https://github.com/DaveSkender/Stock.Indicators.Python/issues/357#issuecomment-2029853752 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/ANHFH5G62OX47GILGXDZ4D3Y3FV7PAVCNFSM6AAAAABE77SCGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRZHA2TGNZVGI unsubscribe. You are receiving this because you authored the thread. https://github.com/notifications/beacon/ANHFH5DCNMVNKDDC2QVKGPDY3FV7PA5CNFSM6AAAAABE77SCGKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTY7UODQ.gif Message ID: < @.> @.>

DaveSkender commented 3 months ago

Happy to help. Best of luck with your algos!