ModuleNotFoundError: No module named 'tabulate' - tabulate

I am using Jupyter notebook system. I have already installed tabulate using cmd as pip install tabulate. The requirements are also satisfied but still getting this error.
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-9a451b8ebc97> in <module>
1 import glob
2 import pandas as pd
----> 3 from tabulate import tabulate
4 def print_helper():
5 print()
ModuleNotFoundError: No module named 'tabulate'
Any help will be appreciated.

You just need to install tabulate like this:
pip install tabulate

Related

Cannot import name 'BlobClient' from 'azure.storage.blob. Django

Although, there are many similar questions to the one I am asking, but non of them have helped me.
I am trying to store the file into my azure storage blob through directly through my system using Django. can some help me?
Here is the result of pip freeze:
azure-nspkg==3.0.2
azure-servicebus==0.21.1
azure-servicefabric==6.3.0.0
azure-servicemanagement-legacy==0.20.7
azure-storage-blob==1.5.0
azure-storage-common==1.4.2
azure-storage-file==1.4.0
azure-storage-queue==1.4.0
I got the following importerror:
from azure.storage.blob import (
ImportError: cannot import name 'BlobClient' from 'azure.storage.blob'
You can try reinstalling azure-storage-blob.
Unistall: python3 -m pip uninstall azure-storage-blob
Install: python3 -m pip install azure-storage-blob
You can refer to similar bugs: cannot import name 'BlobClient' from 'azure.storage.blob and ImportError: cannot import name 'BlobServiceClient' from 'azure.storage.blob'

plotly - AttributeError: 'module' object has no attribute 'tools'

When I try to use plotly for Python 2.7 I get an AttributeError.
In [1]: import plotly
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-c27a4132ad2e> in <module>()
----> 1 import plotly
c:\projects\flask\plotly.pyc in <module>()
AttributeError: 'module' object has no attribute 'tools'
So I tried this:
pip install tools
It gave me an error: Failed building wheel for lxml. So I just installed a .whl file
pip install lxml-3.6.0-cp27-none-win32.whl
After that I was able to install tools module. Yet, AttributeError is still there and won't let me use plotly.
Also, I tried using setting a virtual environment and use then plotly - I get the same error.
Fixed it... All I had to do was to just delete plotly.pyc file in home directory. Not sure what it is for and how it got there, but it seemed out of place, so I deleted it and it worked!

How to import modules into Jupyter notebook

So I am using anaconda and conda in a Windows OS.
And as you may know Jupyter gets installed automatically with Anaconda.
My python code runs normally when using the python command
python myfile.py
However when I try to run it through jupyter I receive the following error
ImportError Traceback (most recent call last)
<ipython-input-1-43605f892034> in <module>()
1 #!/usr/bin/env python
2 import os
----> 3 from gensim import corpora, models, similarities
4 from gensim.models import LsiModel
5 import logging
ImportError: No module named gensim
To troubleshoot I checked the following
Made sure to run jupyter notebook while enabling the activating the proper environment
Made sure the activated envrioment has the "gensim package" installed
So to solve this issue I need to install the missing library through jupyter itself
So I have to add and run the following command in a jupyter cell
pip install --upgrade gensim

ImportError: matplotlib requires dateutil- python

I get this error when i try to import matplotlib. I have installed matplotlib.
Traceback (most recent call last):
File "<pyshell#23>", line 1, in <module>
import matplotlib
File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 110, in <module>
raise ImportError("matplotlib requires dateutil")
ImportError: matplotlib requires dateutil
how do I solve this problem?
matplotlib depends on dateutil
On Linux you can install it using
pip install python-dateutil
You can reinstall them forcefully using
pip install python-dateutil --force-reinstall --upgrade
To install pip on windows get the script get-pip.py from here. Then on cmd run
python get-pip.py

MySQLdb module is not installed on my python

I am trying to install the mysqldb module in my python2.7 ubuntu. I am using the following ways to install
$ tar -xvf MySQL-python-1.2.2.tar
$ cd MySQL-python-1.2.2
$ sudo python setup.py build
$ sudo python setup.py install
then i am going to import the module. It shows the following error.
import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named MySQLdb
I have also tried to install by using apt-get and pip. there is no way it shows the same above import error. Could you please help me? thanks in advance.