Issue implementing pandas_datareader module - python

On MacOs
Jupyter Notebook
I'm having issues trying to implement a pandas module, I did pip list and it says that it is installed, so I'm not sure why I get
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-6-84d930aeb84e> in <module>
----> 1 from pandas_datareader import data as wb
ModuleNotFoundError: No module named 'pandas_datareader'
is there something else I need? Thanks.
I'm not sure why it's not working, I tried on VScode as well.

Related

Why does the pattern package fails to be imported in jupyter notebook yet it is already installed

I installed pattern3 in the cmd with: pip install pattern3
and it was successful I also installed in the jupyter notebook and still it was successful.
However, when I try to import it with import patterns I get this error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_2116/1948699844.py in <module>
----> 1 import patterns
ModuleNotFoundError: No module named 'patterns'
I think you have made a typo. The import statement for the pattern3 module would be import pattern3, not import patterns.
If you have installed the pattern3 module correctly, you should be able to import it by using the new statement.

Python/Jupyter Notebook Not finding modules...?

I just got done writing a pretty good rock paper scissors game and now when I try to import it and run the cell I'm getting this:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-7-8d3be5084430> in <module>
----> 1 import RPSgame.py
ModuleNotFoundError: No module named 'RPSgame.py'; 'RPSgame' is not a package
What is causing this and how can I fix it? I'm running Jupyter Notebook through Anaconda Navigator
It might be related to how you are importing the .py file
This link might help: How to import other Python files?
You shall try this:
import .RPSgame

Databricks job cannot find python library imported in the cluster

I am trying to run a cron job on my notebook and I get an "no module found" error. When I look at the job logs this is the full error:
ModuleNotFoundError Traceback (most recent call last)
<command-2307930105977041> in <module>
1 from __future__ import print_function
2 import sys
----> 3 import pymysql
ModuleNotFoundError: No module named 'pymysql'
This library has been installed to my cluster that I am running the job from and the notebook that uses this library runs and does not show a ModuleNotFoundError. I ran the import pymysql in it's own cell and it does not throw me back an error, only when I run a job on that notebook do I get an error.
What can be the cause for this?

Can't import zipline.transforms

I'm trying to import zipline.transforms, but the output message says No module named transforms. I'm using python2.7 and downloaded zipline via conda.
from zipline.transforms import batch_transforms
ImportErrorTraceback (most recent call last)
<ipython-input-55-253f85965feb> in <module>()
----> 1 from zipline.transforms import batch_transform
ImportError: No module named transforms
First, is your IDE (pycharm or sublime) included Anaconda in the path? Second, please check where you zipline module was installed, usually .../lib/python2.7/site-packages/zipline, does it include a module called "transforms"? maybe it's an old module, not in the updated zipline anymore.

How to Import linear_algebra Python Jupyter Notebook

I am having some difficulty trying to get the linear_algebra module working on Jupyter Notebook in Python. I am trying:
import linear_algebra
But I get the following error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-30-7080be6cdc0f> in <module>()
----> 1 import linear_algebra
ImportError: No module named 'linear_algebra'
I don't get what I am doing wrong
Thank you in advanced for help
The 'linear_algebra' is not a library so you can't simply import it as such. It is a file that has the functions (eg. dot) so you have to make sure your main code file and the linear_algebra.py is at the same directory. I hope this helps.

Categories

Resources