I am using Python 3.6 and I have miniconda. I have installed matplotlib using the command 'conda install matplotlib'. Courtsey other answers here, I also used the pip package to install matplotlib. However, when I try to import matplotlib on my Python Shell, it gives me a 'No Module named 'matplotlib' ' error.
I have tried reinstalling my python and tried it with python 3.7 and the issue has persisted.
None of the answers to other questions similar to this are working, what should I do? Any help is appreciated, thanks
Related
input:
import pandas
output:
ModuleNotFoundError: No module named 'pandas'
I installed the package with the command line - pip3 install pandas,
my python version is 3.10.7
The source of the installed panda package: c:\users\kfirs\appdata\local\programs\python\python310\lib\site-packages
not sure if this will help but in the command prompt type pip --version check to make sure you're on a version that is fluent with pandas, don't know much about pandas but I assume you should try and do the same with pandas. My knowledge is limited but try installing on the same drive as python as this could possibly be why things are not working. 3rd sometimes I have issues with windows after installing pip packs so try restarting your pc sometimes my imports right after installing don't work and this usually fixes but only if it's truly installed where it needs to be and the version needed. Hope I could help.
I tried to use torch in spyder but I got error ModuleNotFoundError: No module named 'torch' so I tried use pip module not in cmd but in spyder itself following
import pip
pip.main(["install","torch"])
but got ModuleNotFoundError: No module named 'pip' and I know I had successfully used it in spyder before but recent automatic spyder updates probably have caused this error so I tried to install pip in my all python environments in cmd with cd {environment_path}but the pip was installed there. I also used python -m ensurepip in all environments but I still get ModuleNotFoundError: No module named 'pip'.
seems the problem is caused by reseting spyder(maybe there other causes) changing different python interpreters (environments) also is no help!! and installing or reinstalling with windows installer solved problem for me.
update: after restarting again many modules like 'pip', 'torch' and 'keyboard' are not recognized and reinstalling is no answer(no difference between installing for 'this user' or 'all users').
I'm trying to display data using a pie chart in python, so i tried to install matplotlib using pip. After doing that, I tried importing matplotlib but I get an error: ModuleNotFoundError: No module named 'matplotlib'.
In the Command Prompt I typed 'pip install matplotlib' and everything appeared to be successful. This is the last line:
Successfully installed backports.functools-lru-cache-1.5 cycler-0.10.0 kiwisolver-1.0.1 matplotlib-2.2.4 numpy-1.16.2 pyparsing-2.3.1 python-dateutil-2.8.0 pytz-2018.9 six-1.12.0
I've also tried 'python -m pip install -U matplotlib', but I still get a ModuleNotFoundError.
I've tried running the input statement in both python 3 and 2, neither worked.
I've looked at various different discussions on this, and none of them seemed to help me. How can I fix this?
There are various python installed in your OS. If you install matplotlib for somewhere the python that you are using does not search, you get importing errors. You should figure out which python you want to use and where the packages it searches.
check your python path. the matplotlib should be installed in the same path with your python environment.
I guess you use an IDE to run the python. some IDE have their own python environment.
if not solved. plz introduce some details about your system、how installed etc.
I installed python 3.7 on my pc (win 10). Later I tried to install matplotlib using a pip command, it installed and matplotlib is now also inside the pip list. When I go to the lib/site-packages folder where I saved python, it clearly has matplotlib inside of it. matplolib also works when us it in my command promt after using the 'python' command. But when I wanna import it in my project in pycharm, it does not work and no module is found.
I am new to all this and this is the first module I installed for python, so I can not figure out what I am doing wrong here. The version of matplotlib I am trying to install is 2.2.3.
Thx for any help
I am trying to create a graph on Python (version 3 and above) using matplotlib, however I keep getting the error saying
ImportError: No module named 'six'
Does anyone know how to fix this? I have already tried downloading the module. And I still get this error.
Are you sure you've installed six?
If you have both python 2.x and 3.x installed, it may be that when running easy_install or pip, you're installing six for 2.x rather than 3.x. If you have pip, try running pip3 install six in a shell, or for easy_install, run easy_install-3.4 six (replace 3.4 with your 3.x python version).