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.
Related
I am running Eclipse IDE 4.20.0 with a PyDev Interpreter on Windows10. I am trying try to get [Camelot][1] to run within my script but continue to get the error-
"Original error was: No module named 'numpy.core._multiarray_umath'"
For each, I have used pip install to install camelot, tabula-py, numpy, pandas, etc. and all of them seemed to install appropriately. My Eclipse Project Properties PYTHONPATH is pointed to the install location and I haven't had issues with other libraries I have installed previously.
The Python version is: Python3.7
The NumPy version is: "1.21.5"
I also tried reverting numpy to an older version (1.15.1) but had no success there based on other posts that I have seen here on stackoverflow. Additionally, I have read the numpy support site that is listed in the error below but can't find anything that would be of note in my system as an issue...
Ultimately, I am attempting to read tables from a PDF in python but it seems that the libraries available (camelot, tabula, etc.) all give me the same issue with numpy. Any suggestions here would be greatly appreciated.
The full error that I am getting is -
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed.
This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
The Python version is: Python3.7 from "C:\Users~~~\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe"
The NumPy version is: "1.21.5"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy.core._multiarray_umath'
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.
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.
I've tried installing Pandas in many different ways. Currently, it is installed using Anaconda and I have created a virtual environment. Below it shows that Pandas is installed, yet the module still can't be detected. Sorry if this has been answered before. I am still a beginner with Python.
Picture of current Terminal
maybe it doesn't match with the version you use which version you use?You can find it by pressing python in a terminal.Maybe you dont find it in the version you are using!
Being a complete begginer in python, I decided to install the python interpreter 3.4.4, and also PyDev plugin for eclipse IDE. I am also using windows 10.
I have encountered a problem regarding certain imports, namely : from PIL import Image, ImageTk, which is apparently an unresolved import.
I have looked at certain questions which were similar to my situation, but most of them gave a solution like installing packaged from the linux apt-get. Here are some topics I visited :
Uninstalling and reinstalling Pillow and pip,
Installing pillow-imaging-tk on Ubuntu,
This topic which left me very confused,
This one seemed helpful, but is on Unix OS again
So please, could someone explain to me why I am seeing this error, and how could I correct it if I absolutely want to use Eclipse, Pydev, windows 10 and Python 3.
Found the solution, here's what I did:
Set the PYTHONPATH like it is shown in this article, make sure python.exe is accessible via cmd,
Via cmd, type pip install pillow. Alternatively, you can enter the same command from Windows+R,
(Not sure if relevant step) Via eclipse, Windows->Preferences->PyDev->PythonInterpreterremove your interpreter to re-add it,
Restart eclipse.
For Python import problems in PyDev, the project web site has a page on interpreter configuration that is a good place to start. I recently had a similar problem that I solved by adding a module to the forced builtins tab.