(venv) [root@z1 myproject]# ./tst.py
3.5.1 (default, Jul 13 2016, 08:50:23)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)]
Traceback (most recent call last):
File "./tst.py", line 5, in <module>
from tabulate import tabulate
ImportError: No module named 'tabulate'
(venv) [root@z1 myproject]#
(venv) [root@z1 myproject]# python
Python 3.5.1 (default, Jul 13 2016, 08:50:23)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
.>>> from tabulate import tabulate
.>>>
Asked
Active
Viewed 1,711 times
0

Łukasz Rogalski
- 22,092
- 8
- 59
- 93

Nimesh Doshi
- 11
- 7
-
Possible duplicate of [Cannot import a python module that is definitely installed (mechanize)](https://stackoverflow.com/questions/14295680/cannot-import-a-python-module-that-is-definitely-installed-mechanize) – ivan_pozdeev Apr 09 '18 at 16:51
1 Answers
0
Nevermind. I resolved it. I've installed that module in virtual environment while script referred to use python installed under /usr/local/bin/python3.5. Issue resolved when i changed it to /usr/bin/env python

Nimesh Doshi
- 11
- 7