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).
Related
I was finally able to get python 3.9.0 installed(was using 3.4.2) on my raspberry pi, however I cannot use pygame now stating "ModuleNotFoundError: no module named 'pygame'. I know where pygame is located, but I have no idea how to get python 3.9.0 to see where it is to read it.
You have to re-install all of your packages when you upgrade to a new major version of Python. You'll need to pip3 install xxxx again.
On my raspberry pi 3, I am trying to run this code, but I get this error:
No module named google.auth.transport.grpc
I have installed all packages listed in the requirements.txt (on the same github page above), and installed grpcio. I have installed google-auth. I have installed google-assistant-sdk. I have no clue why this module is not working correctly. If I open up python and try: import google.auth it gives the same error of "No module named google.auth"
Any ideas as to how I can fix this?
Try to verify the version of Python that you are using to run this code. If you installed the module in Python 2.x and try to run it with Python 3.x it will not work, because modules installed on Python 2 are not usable in Python 3 and vise versa.
I was trying to run the program with python -m textinput.py, which used python 2.x
Using python3 -m textinput.py fixed my issue by using python 3.x
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 have python 2 installed on my machine. I want to use the skbio module for some part of my code. I tried installing skbio (pip install scikit-bio) but it says it does not support python 2 it is only available in python 3. I even tried importing skbio from future in my code but it did not work. Is there any way out I can install and use skbio module for my python 2 version?
Thanks in advance.
scikit-bio dropped Python 2 support in version 0.5.0 and is now only compatible with Python 3.4+. Versions 0.4.2 and earlier are Python 2/3 compatible, so you could try out an older version:
pip install scikit-bio==0.4.2
I've just installed Python 3.5 to experience its functionality. The problem is that all the modules I use in my daily programming have been installed and run very well on it except Matplotlib. I installed it via pip and never faced any errors while installing, but when I wanted to import it, the error saying, DLL load failed: The specified module could not be found. popped up.
What's the matter with Python 3.5, or Matplotlib?
Uninstall the module using pip uninstall matplotlib then install it again using http://matplotlib.org/downloads.html
Obtain the .exe file that best fits your machine, in my case it would be matplotlib-1.4.3.win-amd64-py3.4.exe. This will be a more complete version of matplotlib for windows rather than using pip.
I would also consider rolling back to Python 3.4 unless you absolutely need 3.5. There shouldn't be a compatibility issue between 3.4 and 3.5 for Python, but as far as matplotlib it's been tested with 3.4, but if you run through problems on 3.5 I would roll back.
If you have Python 3.5 you should install MS's Redistributable DLLs to make matplotlib working on Windows... In my case, no need to reinstall matplotlib even...
Try this example without. If error appears install that and try with it (you must log in MS site and download version for arch you using - i tested x86 only, Windows 7, Python 3.5).
That case is included in matplotlib install documentation!
Remember, you should always read documentation before you ask!