Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble importing tabulate in Python 3.4

I have just installed tabulate for python in order to tabulate my output in the terminal. When ever i try to import tabulate into python 3.4, it gives me an error saying

ImportError: No module named 'tabulate'

But, whenever I import it into a python2.7 console it seems to work. Can you please help me try to get this to work in python 3.4. My OS is linux.

like image 986
Harry Potter Avatar asked Aug 01 '15 02:08

Harry Potter


People also ask

Why is tabulate not working Python?

The Python error "ModuleNotFoundError: No module named 'tabulate'" occurs for multiple reasons: Not having the tabulate package installed by running pip install tabulate . Installing the package in a different Python version than the one you're using. Installing the package globally and not in your virtual environment.

How do I install tabulate in Python 3?

Type "cmd" in the search bar and hit Enter to open the command line. Type “ pip install tabulate ” (without quotes) in the command line and hit Enter again. This installs tabulate for your default Python installation. The previous command may not work if you have both Python versions 2 and 3 on your computer.


1 Answers

for python3 i've noticed the simple "pip3 install tabulate" does not put the lib in proper locations.

for python3:

python3 -m pip install tabulate
like image 149
Payam Chychi Avatar answered Sep 28 '22 02:09

Payam Chychi