WillKoehrsen / Data-Analysis

Data Science Using Python
https://medium.com/@williamkoehrsen/
MIT License
5.12k stars 3.63k forks source link

cannot import name 'Stocker' from 'stocker' #65

Open thecoltster1 opened 3 years ago

thecoltster1 commented 3 years ago

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?

pardeep-tm commented 3 years ago

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

joshuah9 commented 3 years ago

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.
Ankrik commented 2 years ago

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.