Spyder cannot find module named 'pandas_datareader' - python

First off I would like to say that I am aware that this question has been asked before, however, none of the other posts have offered a solution that resolves the problem.
I am trying to use pandas-datareader to grab stock prices from the internet. I am using windows with python version 3.6. I first installed pandas-datareader from the console using
pip install pandas-datareader.
I then wrote a code which used the line
import pandas_datareader.data as web
It came back with the error
`ModuleNotFoundError: No module named 'pandas_datareader'
I tried to redownload pandas-datareader, just in case it didn't work the first time, but the console came back with "Requirement already satisfied" so that wasn't the problem.
From there I uninstalled pandas-datareader, and reinstalled it with
pip3 install pandas-datareader
I still got the same error message.
I was worried that it might have something to do with old versions of python installed on my computer so I deleted all files for python 2.7, but this did not help the issue. I restarted spyder and my computer and this did not help. I tried Jupiter notebook and this did not help either.
Now to take my investigation one step further, I looked in my file folders at the hidden files to see where pandas-datareader could be hiding. When I go to C:\Users\J.Shepard\Anaconda3\pkgs and C:\Users\J.Shepard\Anaconda3\pkgs I see that pandas-0.23.0-py36h830ac7b_0 is installed but I cannot find anything that looks like pandas-datareader. In fact, when I search for "pandas-datareader" in my file search, I only see 2 text files with one line of code each. I do not know what to make of this discovery but I thought it might be helpful to someone else.
I hope that I have made a good case to prove that I have genuinely tried and failed to solve this problem on my own. Based on the number of other unresolved posts related to this same question, I believe that this is a question that deserves to be asked again.

I tried conda install pandas-datareader in Anaconda Prompt. It was installed and after my computer restarted, pandas-datareader worked in spyder 3.6.

Related

Pip Fatal Error in launcher: Unable to create process when using ""

I already fixed this, but I will post the question anyways and answer it so if there are other people having this issue they may find this.
I installed blender a while ago and did some stuff using python. I can't recall what exactly I did, it was for a school project. However, when I recently tried to use pip to install something I got the following message:
Error in launcher: Unable to create process when using "path to python my blender folder"
Even if you get this answer due to another situation my solution might still help you.
This worked for me:
First I uninstalled Blender.
Then I uninstalled python and reinstalled the newest version.
I deleted every environment variable path I could find leading to an old python version.
In the Terminal I entered where pip and still got some paths leading to old python versions, I went to these locations and deleted every folder labeled with an old python version, in my case these locations were C:\Python37and C:\Users\myusername\Appdata\Roaming\Python
And that's it. After that pip worked as it should.

Python Pip broken: error sys.stderr.write(f“ERROR: {exc}”)

Good morning everyone,
MacBook Air 2017.
I am new to code, and I have just started to learn a few lines of Python. I had installed version 3.8 a few months ago, and now I have started learning a bit more seriously. I found out about the pip command, but trying to install the docx pip through "pip install python-docx" showed me an error.
To be completely honest, I started to watch on the internet how to fix this problem, but I didn't really understand what I was doing. I tried to install Pyenv to somehow correct the error by making Python 3.9.4 the default version for the Mac, following this website https://opensource.com/article/19/5/python-3-default-mac. I tried to modify the .bash trough "touch ~/.bash_profile; open ~/.bash_profile", hoping this would somehow fix the issue following How do I edit $PATH (.bash_profile) on OSX?. In the end, I just decided to uninstall both 3.8 and 3.9.4 to somehow start again through https://apple.stackexchange.com/questions/284824/remove-and-reinstall-python-on-mac-can-i-trust-these-old-references, but nothing happened. At this moment in time, I have no clue what happened and if somehow I have made things even worse (which I probably did).
Right now, whenever I use any command with pip an error comes up, and I don't know how to fix it in order to be able to use modules & pip in Python. The error could be the same as the following one that I have attached to the post, which comes up after writing commands in terminal:
Image with a few errors
Thanks a lot, Bye.

Numpy installed, but module not found

I've tried several fixes for this suggested in other threads, but no luck.
I'm new to Python. I had 3.8.5 installed and wrote a few simple scripts that worked using PyCharm and the numpy and sympy modules. Today I opened PyCharm and tried to write a simple script using numpy, but I got an error saying the numpy module did not exist. I also got this error when trying to run the older scripts. I checked in cmd with pip3, and got the result that it was already satisfied. I uninstalled Python, numpy, and PyCharm, reinstalled all and I'm having the same problem. This problem seemed to crop up on its own - I don't recall making any changes that would've caused this.
Can anyone give me other options?
One of the most common issues with Python is having multiple versions installed and losing track of which one you are using and/or which one you're installing to with pip.
In Pycharm check what interpreter your project is using. If there is more than one available chance are you installed numpy on the other one.
https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#add-existing-interpreter
You can also install numpy direct from Pycharm, simply hover over the import statement and if it's not installed on the current interpreter it will offer you a link to click in install it.
If that doesn't help, post the exact error message and your code.

Test Anaconda build after updating packages

I use conda update --all to update my packages. Recently, I encountered an error with Anaconda build, posted at Error while trying to update and use scipy module in Anaconda. It seems now the issue has been fixed. Is there any way, I can test all modules one by one by importing them and deleting them ? I am requesting this because I have noticed that if import doesn't work, I spend a lot of time figuring out the dependency and then the package that is causing this. For instance, a few minutes ago I found that PyCharm 2018.2.4 breaks with the latest version of matplotlib (3.0.0). Hence, it might be helpful to run some type of test script after running conda update --all to ensure that all packages are indeed working--i.e. importable.
I did some research on this topic and found three sources.
First, Anaconda offers run_test.py (Source: https://conda.io/docs/user-guide/tasks/build-packages/recipe.html). However, being new to the world of Python, I am unsure how to go about running a script in Anaconda terminal.
Second, I found: https://conda.io/docs/user-guide/install/test-installation.html. However, this just tells me the version of the package. I am not interested in the version. I need to know whether all packages import properly.
Finally, I found out that there is a method to run test script for all packages at https://anaconda-installer.readthedocs.io/en/latest/testing.html. However, I am unsure how I can run make in Anaconda terminal. I used to use make long time ago when I worked on gcc on Unix environment. Being new to Python, I am unsure how to go about handling this.
I'd appreciate any thoughts or any test script that could help us verify two things:
a) whether all packages have been installed
b) packages are indeed importable; If the package import fails, the script should terminate with handsome error message highlighting the source (package) where import failed.

entry point mkl_blas_dgem2vu could not be located

I'm running Anaconda/Spyder and I keep getting the Intel Math Library error shown in the picture:
It seems like an entry point for mkl_blas_dgem2vu is missing (whatever that is).
I was still able to run Spyder until I tried updating everything. After updating Spyder doesn't start after receiving this error.
I stuck and can't do anything right now.
Thanks.
I already found that post and it solved part of my problem.
First part of problem is that different a version of the MKL library was in the system32 & SYSWOW64 directories. It was loaded by another application. Anaconda was using those libraries instead of the one installed for Anaconda. I eliminated the other versions of the MKL libraries and reinstalled Anaconda. I tried without re-installing and it didn't work.
The 2nd problem was solved with that post you suggested that I found on my own. It seems like Spyder or Ipython is not compatible with the newest version of the MKL_intel_thread.dll library. I downgraded and I'm back in business.

Categories

Resources