WillKoehrsen / Data-Analysis

Data Science Using Python

Home Page:https://medium.com/@williamkoehrsen/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot import name 'Stocker' from 'stocker'

thecoltster1 opened this issue · comments

Getting this message:

  Message=cannot import name 'Stocker' from 'stocker' (C:\Users\Colter\AppData\Local\Programs\Python\Python38\lib\site-packages\stocker\__init__.py)
  Source=C:\Users\Colter\source\repos\Stockbroker\Stockbroker\Stockbroker.py
  StackTrace:
  File "C:\Users\Colter\source\repos\Stockbroker\Stockbroker\Stockbroker.py", line 2, in <module>
    from stocker import Stocker

This is my code:
`import tensorflow
from stocker import Stocker

amazon = Stocker('AMZN')`

Not sure what to do here?

You should use Jupyter Notebook and place the Stocker module in the same dir where ur notebook is.

I did that, and I get:
ImportError Traceback (most recent call last)
in
----> 1 from stocker import Stocker

ImportError: cannot import name 'Stocker' from 'stocker' (C:\Users\joshu\OneDrive\Desktop\Stocks\PredictiveStocks\stocker_init_.py)

not sure if I'm pulling the wrong stocker.

I think you are referring to the Stocker package which helps in Stock Price Prediction.

Note

The Stocker package gets placed into the stocker directory. On the Stocker github it mentions how you should open a document in Jupyter Notebook from the stocker directory. Check if your stocker directory is in a hidden appdata folder, currently make the folder unhidden to try using Stocker.